"nofollow" if object.tags.empty?
end
- def type_and_paginated_count(type, pages, selected_page = pages.current_page)
- if pages.page_count == 1
- t ".#{type.pluralize}",
- :count => pages.item_count
- else
- t ".#{type.pluralize}_paginated",
- :x => selected_page.first_item,
- :y => selected_page.last_item,
- :count => pages.item_count
- end
- end
-
def sidebar_classic_pagination(pages, page_param)
max_width_for_default_padding = 35
-<h4 class="fs-5"><%= type_and_paginated_count(type, pages) %></h4>
-<% if pages.page_count > 1 %>
+<% if pages.page_count == 1 %>
+ <h4 class="fs-5">
+ <%= t ".#{type.pluralize}", :count => pages.item_count %>
+ </h4>
+<% elsif pages.page_count > 1 %>
+ <h4 class="fs-5">
+ <%= t ".#{type.pluralize}_paginated", :x => pages.current_page.first_item,
+ :y => pages.current_page.last_item,
+ :count => pages.item_count %>
+ </h4>
+
<%= sidebar_classic_pagination(pages, "#{type}_page") do |page|
{
- :title => type_and_paginated_count(type, pages, page),
+ :title => t(".#{type.pluralize}_paginated", :x => page.first_item,
+ :y => page.last_item,
+ :count => pages.item_count),
:data => { :turbo => "true" }
}
end %>