Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wip/issue 7 13 #26

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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