Sha256: d728ea77c849d07a6b569fe28649a0289f9351a2e6c8b7f91e317d98faa4884d

Contents?: true

Size: 1.93 KB

Versions: 10

Compression:

Stored size: 1.93 KB

Contents

<%% content_for :data_controls do %>
  <%%= render :partial => '/layouts/admin/search', :locals => {:search_path => admin_<%= module_name_formatted %>_path } %>
  <%%= link_to "New <%=module_name_formatted.singularize.humanize.titlecase%>", new_admin_<%=module_name_formatted.singularize%>_path, :class => "btn btn-primary", :title => "New <%=module_name_formatted.singularize.humanize.titlecase%>" %>
<%% end %>

<%% content_for :detail do %>
  <div class="table-responsive">
    <table class="table table-striped table-hover">
      <thead>
        <tr><%attribute_names.each do |attribute|%>
          <th><%=attribute.humanize.titlecase%></th><% end %>
          <th>&nbsp;</th>
        </tr>
      </thead>
      <tbody>
        <%% @<%=module_name_formatted%>.each do |<%=module_name_formatted.singularize%>| %>
          <tr>
            <%-attribute_names.each do |attribute|-%>
            <td><%%= <%=module_name_formatted.singularize%>.<%=attribute%> %></td>
            <%-end-%>
            <td class="table-actions">
              <%%= link_to 'Details', admin_<%=module_name_formatted.singularize%>_path(<%=module_name_formatted.singularize%>), :class => 'btn btn-default btn-sm' %>
              <%%= link_to 'Edit', edit_admin_<%=module_name_formatted.singularize%>_path(<%=module_name_formatted.singularize%>), :class => 'btn btn-default btn-sm' %>
              <%%= link_to 'Delete', admin_<%=module_name_formatted.singularize%>_path(<%=module_name_formatted.singularize%>), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this <%=module_name_formatted.singularize.humanize%>?'}, :class => 'btn btn-danger btn-sm' %>
            </td>
          </tr>
        <%% end %>
      </tbody>
    </table>
  </div>
  <%%= will_paginate @<%=module_name_formatted%>, :renderer => BootstrapPagination::Rails %>

  <script>
    document.addEventListener('DOMContentLoaded', app.admin.<%= module_name_formatted %>.index);
  </script>

<%% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tb_core-1.5.4 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.5.3 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.5.2 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.5.1 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.5.0 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.8 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.7 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.6 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.5 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.4 lib/generators/spud/templates/views/admin/index.html.erb