|
|
|
|
@ -1,27 +1,29 @@
|
|
|
|
|
<% link = pagy_anchor(@pagy) %>
|
|
|
|
|
<% if @pagy.pages > 1 %>
|
|
|
|
|
<% link = pagy_anchor(pagy) %>
|
|
|
|
|
<% if pagy.pages > 1 %>
|
|
|
|
|
<div class="flex my-6 justify-center md:justify-between">
|
|
|
|
|
<div class="hidden md:block text-sm">
|
|
|
|
|
<% if @pagy.count.nil? %>
|
|
|
|
|
<%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_without_total", from: local_assigns.fetch(:from, @pagy.from), to: local_assigns.fetch(:to, @pagy.to)) %>
|
|
|
|
|
<% if pagy.count.nil? %>
|
|
|
|
|
<%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_without_total", from: local_assigns.fetch(:from, pagy.from), to: local_assigns.fetch(:to, pagy.to)) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_with_total", from: local_assigns.fetch(:from, @pagy.from), to: local_assigns.fetch(:to, @pagy.to), count: local_assigns.fetch(:count, @pagy.count)) %>
|
|
|
|
|
<%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_with_total", from: local_assigns.fetch(:from, pagy.from), to: local_assigns.fetch(:to, pagy.to), count: local_assigns.fetch(:count, pagy.count)) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= local_assigns[:left_additional_html] %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center space-x-1.5">
|
|
|
|
|
<%= local_assigns[:right_additional_html] %>
|
|
|
|
|
<div class="join">
|
|
|
|
|
<% if @pagy.prev %>
|
|
|
|
|
<%== link.call(@pagy.prev, '«', classes: 'join-item btn min-h-full h-10') %>
|
|
|
|
|
<% if pagy.prev %>
|
|
|
|
|
<%== link.call(pagy.prev, '«', classes: 'join-item btn min-h-full h-10') %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">«</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<span class="join-item btn font-medium uppercase min-h-full h-10">
|
|
|
|
|
<%= t('page_number', number: @pagy.page) %>
|
|
|
|
|
<%= t('page_number', number: pagy.page) %>
|
|
|
|
|
</span>
|
|
|
|
|
<% if @pagy.next %>
|
|
|
|
|
<%== link.call(@pagy.next, '»', classes: 'join-item btn min-h-full h-10') %>
|
|
|
|
|
<% if local_assigns[:next_page_path].present? %>
|
|
|
|
|
<%= link_to '»', local_assigns[:next_page_path], class: 'join-item btn min-h-full h-10' %>
|
|
|
|
|
<% elsif pagy.next %>
|
|
|
|
|
<%== link.call(pagy.next, '»', classes: 'join-item btn min-h-full h-10') %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">»</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
|