Sha256: 444f9bc6c9bae00b44cdcad2a487a2b950940490934da3824ab0402c031067d4

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

<%
  page_title = _t("%{resources}", :resources => @resource.model_name.human.pluralize)
  title(page_title)
%>

<% content_for :sidebar, build_sidebar %>

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

<%= display_flash_message %>
<%= typus_render :partial => 'index' %>

<% if (build_filters || search) && !@resource.count.zero? %>
  <div class="filters">
    <%= build_filters %>
    <%= search %>
  </div>
<% end %>

<% if @resource.count.zero? %>
  <p>
    <%= _t("There are no %{records}.", :records => @resource.model_name.human.pluralize.downcase) %>
    <%= link_to _t("Create one now."), { :action => "new" } if current_user.can?('create', @resource) %>
  </p>
<% end %>

<% if @items.any? -%>
  <%= raw build_list(@resource, @fields, @items) %>
  <%= will_paginate(@items, :renderer => Typus::Pagination) %>
<% end %>

<% if @items.empty? && !@resource.count.zero? %>
  <div class="flash notice">
    <%= _t("There are no %{records} under this filter.", :records => @resource.model_name.human.pluralize.downcase) %>
  </div>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
typus-3.0.2 app/views/admin/resources/index.html.erb
typus-3.0.1 app/views/admin/resources/index.html.erb
typus-3.0.0 app/views/admin/resources/index.html.erb
typus-1.0.0.pre13 app/views/admin/resources/index.html.erb
typus-1.0.0.pre12 app/views/admin/resources/index.html.erb
typus-1.0.0.pre11 app/views/admin/resources/index.html.erb