%= 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' %>
<%=displayable_field[:field_display].header %> |
<% 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' %>
|
<% end %>
<% end %>
<% if @mega_bar[:app_format].app_format == 'grid' %>
<%# abort(model.inspect) %>
<%= link_to 'Show', link_path('show', model.id) %> |
<%= link_to 'Edit', link_path('edit', model.id) %> |
<%= link_to 'Destroy', model, method: :delete, data: { confirm: 'Are you sure?' } %> |
<% end %>
<%= @mega_bar[:app_format].record_wrapper_end.html_safe%>
<% end %>
<%=@mega_bar[:app_format].app_wrapper_end.html_safe%>
<%= submit_tag %>
<% end %>
---|