Skip to content

Commit

Permalink
Merge pull request #26 from goosys/wip/issue-7-13
Browse files Browse the repository at this point in the history
Wip/issue 7 13
  • Loading branch information
goosys authored Jul 21, 2024
2 parents da84a0f + dc39ecd commit 3503362
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/views/administrate/application/_flashes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ This partial renders flash messages on every page.
<div class="flashes">
<% flash.each do |key, value| -%>
<% next unless value.respond_to?(:html_safe) %>
<div class="flash flash-<%= key %>"><%= value.html_safe %></div>
<div class="flash flash-<%= key %>">
<% if value.is_a?(Array) %>
<ul>
<% value.each do |v| %>
<% next unless v.respond_to?(:html_safe) %>
<li><%= v.html_safe %></li>
<% end %>
</ul>
<% else %>
<%= value.html_safe %>
<% end %>
</div>
<% end -%>
</div>
<% end %>
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 3503362

Please sign in to comment.