Sha256: 06bd7b9d0dbdd6b9c421c4e43d7d30dfc27a95e59872c8e7668e3e942c048bb9

Contents?: true

Size: 1.39 KB

Versions: 4

Compression:

Stored size: 1.39 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.
- `show_search_bar`:
  A boolean that determines if the search bar should be shown.

[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Collection
%>

<%=
  render("index_header",
    resources: resources,
    search_term: search_term,
    page: page,
    show_search_bar: show_search_bar,
  )
%>

<section class="m-5 bg-white shadow overflow-hidden overflow-x-scroll rounded-lg">
  <%= render(
    "collection",
    collection_presenter: page,
    collection_field_name: resource_name,
    page: page,
    resources: resources,
    table_title: "page-title"
  ) %>

  <div class="bg-white px-4 py-3 border-t border-gray-200 sm:px-6">
    <%= render("pagination", resources: resources) %>
  </div>
</section>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
administrate_tailwind_theme-0.0.6 app/views/administrate/application/index.html.erb
administrate_tailwind_theme-0.0.5 app/views/administrate/application/index.html.erb
administrate_tailwind_theme-0.0.4 app/views/administrate/application/index.html.erb
administrate_tailwind_theme-0.0.3 app/views/administrate/application/index.html.erb