Sha256: cadac177b6920b37ac8b7701e5e7343d4e073b2e2b07fba4a0fc97365191b3af

Contents?: true

Size: 1.91 KB

Versions: 17

Compression:

Stored size: 1.91 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).ready(app.admin.<%= module_name_formatted %>.index);
  </script>

<%% end %>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tb_core-1.4.3.1 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.3 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.2 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.1 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.0.1 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.beta2 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.4.beta1 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.10 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.9 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.7 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.6 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.5 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.4 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.3 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.2 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.1 lib/generators/spud/templates/views/admin/index.html.erb
tb_core-1.3.0 lib/generators/spud/templates/views/admin/index.html.erb