Sha256: e74b12c1ba31fcf47c23134ec65c4b5dfbc1119b9b33e592c672e421159dc6f4

Contents?: true

Size: 1.56 KB

Versions: 5

Compression:

Stored size: 1.56 KB

Contents

<% provide(:page_title, @model.collection_name) -%>
<div class="row-fluid">
  <%= render 'adminpanel/shared/new_resource_button' %>
</div>
<div class="row-fluid">
  <div class="widget widget-padding span12">
    <div class="widget-header">
      <%= content_tag(:i, nil, class: "fa fa-#{@model.icon}") %>
      <h5>
        <%= @model.collection_name %>
      </h5>
    </div>
    <div class="widget-body">
      <div class="dataTables_wrapper form-inline">
        <table id="<%= table_type(@model) %>" class="table table-striped table-bordered dataTable">
          <thead><!-- model attributes -->
            <tr>
              <% @model.display_attributes('index').each do |fields| %>
                <% fields.each do |attribute, properties| %>
                  <th><%= properties['label'] %></th>
                <% end %>
              <% end %>
              <% if @model.is_sortable? %>
                <th>
                  <%= I18n.t('position') %>
                </th>
              <% end %>
              <th><%= I18n.t('actions') %></th>
            </tr>
          </thead><!-- Ends model attributes -->
          <% if @collection != [] %>
            <% last_update = @collection.max_by(&:updated_at).updated_at %>
          <% end %>
          <% cache ["#{@model.name}-collection", last_update], skip_digest: true do %>
            <tbody id="body-content">
              <%= render 'adminpanel/shared/index_records', collection: @collection %>
            </tbody>
          <% end %><!-- end collection cache -->
        </table>
      </div>
    </div>
  </div>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adminpanel-2.4.3 app/views/adminpanel/templates/index.html.erb
adminpanel-2.4.2 app/views/adminpanel/shared/index.html.erb
adminpanel-2.4.1 app/views/adminpanel/shared/index.html.erb
adminpanel-2.4.0 app/views/adminpanel/shared/index.html.erb
adminpanel-2.3.1 app/views/adminpanel/shared/index.html.erb