Skip to content

Commit

Permalink
feat: Add resource total count to Administrate application index page
Browse files Browse the repository at this point in the history
  • Loading branch information
goosys committed Jul 21, 2024
1 parent a56ff47 commit dc39ecd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<% return if resources.total_pages < 2 && position.eql?(:top) %>
<p class="resource-total-count"><%= page_entries_info resources %></p>
3 changes: 3 additions & 0 deletions app/views/administrate/application/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ It renders the `_table` partial to display details about the resources.
<%= content_for(:main) %>
<% else %>
<section class="main-content__body main-content__body--flush">
<%= render("page_entries_info", resources: resources, position: :top) %>
<%= render(
"collection",
collection_presenter: page,
Expand All @@ -48,6 +50,7 @@ It renders the `_table` partial to display details about the resources.
) %>
<%= render("pagination", resources: resources) %>
<%= render("page_entries_info", resources: resources, position: :bottom) %>
</section>
<% end %>
Expand Down

0 comments on commit dc39ecd

Please sign in to comment.