Sha256: 94693913b033ce23e2a2bb8b925084436d7d48c70d33167de5b0856ff12b570d

Contents?: true

Size: 1.61 KB

Versions: 1

Compression:

Stored size: 1.61 KB

Contents

<%= form_tag @mega_bar[:form_path] do |f| %>
  <%=@mega_bar[:app_format].app_wrapper.html_safe%>
  <% if @mega_bar[:app_format].separate_header_row %>
    <% @mega_bar[:displayable_fields].each do | displayable_field | %>
      <%= @mega_bar[:app_format].field_header_wrapper.html_safe%>
      <%= sortable displayable_field[:field].field %>
      <%= @mega_bar[:app_format].field_header_wrapper_end.html_safe%>
    <% end %>
  <% end %>

  <% @models.each do |model| %>
    <%= @mega_bar[:app_format].record_wrapper.html_safe%>
    <% @mega_bar[:displayable_fields].each do | displayable_field | %>
      <% if @mega_bar[:app_format].app_format == 'profile_table' %>
        <tr><th><%=displayable_field[:field_display].header %></th><td>
      <% end %>
      <%= @mega_bar[:app_format].field_wrapper.html_safe%>
     
      <%=render template: displayable_field[:field_display].format.tableize + "/show", locals: {displayable_field: displayable_field, obj: model} %>
      <%= @mega_bar[:app_format].field_wrapper_end.html_safe %>
      <% if @mega_bar[:app_format].app_format == 'profile_table' %>
        </td>
      <% end %>
    <% end %>
    <% if @mega_bar[:app_format].app_format == 'grid' %>
    <%# abort(model.inspect) %>

      <td><%= link_to 'Show', link_path('show', model.id) %></td>
      <td><%= link_to 'Edit', link_path('edit', model.id) %></td>
      <td><%= link_to 'Destroy', model, method: :delete, data: { confirm: 'Are you sure?' } %></td>
    <% end %>
    <%= @mega_bar[:app_format].record_wrapper_end.html_safe%>
  <% end %>
 
  <%=@mega_bar[:app_format].app_wrapper_end.html_safe%>
 <br><%= submit_tag %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mega_bar-0.0.1 app/views/mega_bar/application/_mega_bar_read.html.erb