Sha256: 75509d266b2dbd17b7560bce7108b3f606a65aeff2ef416885173cd7c24ee692
Contents?: true
Size: 1.33 KB
Versions: 1
Compression:
Stored size: 1.33 KB
Contents
<%# # Index This view is the template for the index page. It is responsible for rendering the search bar, header and pagination. It renders the `_table` partial to display details about the resources. ## Local variables: - `page`: An instance of [Administrate::Page::Collection][1]. Contains helper methods to help display a table, and knows which attributes should be displayed in the resource's table. - `resources`: An instance of `ActiveRecord::Relation` containing the resources that match the user's search criteria. By default, these resources are passed to the table partial to be displayed. - `search_term`: A string containing the term the user has searched for, if any. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Collection %> <% content_for(:title) do %> <%= display_resource_name(page.resource_name) %> <% end %> <% content_for(:search) do %> <%= render "search", search_term: search_term %> <% end %> <header class="header"> <h1 class="header__heading" id="page-title"><%= content_for(:title) %></h1> <div class="header__actions"> <%= link_to( "New #{page.resource_name.titleize.downcase}", [:new, namespace, page.resource_name], class: "button", ) %> </div> </header> <%= render "collection", collection_presenter: page, resources: resources %> <%= paginate resources %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-0.3.0 | app/views/administrate/application/index.html.erb |