Sha256: 483e97dbac81f84ced30a23a63331e8eb31f0cfd8abbbd83c7d72d4163187138

Contents?: true

Size: 1.52 KB

Versions: 4

Compression:

Stored size: 1.52 KB

Contents

<%
  page_title = @resource.model_name.human.pluralize
  title(page_title)
%>

<% content_for :main_grid do %>

  <h2>
    <%= page_title %>
    <small><%= list_actions %></small>
  </h2>

  <%= display_flash_message %>

  <%= render 'index' %>

  <ul class="predefined_filters">
    <li><%= link_to Typus::I18n.t("All"), params.dup.cleanup.merge(:action => 'index') %> (<%= resource.count %>)</li>
    <% predefined_filters.each do |filter, action, scope| %>
      <% url = action.is_a?(String) ? params.dup.cleanup.merge(:action => action) : action %>
      <li><%= link_to Typus::I18n.t(filter), url %> <%= "(#{@resource.send(scope).count})" if scope && @resource.respond_to?(scope) %></li>
    <% end %>
    <% unless resource.count.zero? %>
      <li>|</li>
      <li><%= link_to "CSV", :format => 'csv' %></li>
      <li><%= link_to "XML", :format => 'xml' %></li>
    <% end %>
  </ul>

  <% if (build_filters || search) %>
    <div class="filters">
      <%= build_filters %>
      <%= search %>
    </div>
  <% end %>

  <% if @items.any? -%>
    <% if controller.respond_to?(:bulk) %>
      <%= build_actions { build_list(@resource, fields, @items) } %>
    <% else %>
      <%= build_list(@resource, fields, @items) %>
    <% end %>
    <%= paginate(@items, Typus.pagination) %>
  <% else %>
    <p><%= Typus::I18n.t("No %{resources} found.", :resources => @resource.model_name.human.downcase.pluralize) %></p>
  <% end %>

<% end %>

<div class="grid_2">
  <%= build_sidebar %>
</div>

<div class="grid_10">
  <%= yield :main_grid %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typus-3.1.0.rc18 app/views/admin/resources/index.html.erb
typus-3.1.0.rc17 app/views/admin/resources/index.html.erb
typus-3.1.0.rc16 app/views/admin/resources/index.html.erb
typus-3.1.0.rc15 app/views/admin/resources/index.html.erb