2025-06-14 00:05:36 +03:00
|
|
|
<% if pagy.pages > 1 %>
|
2026-07-31 10:53:34 +03:00
|
|
|
<div class="flex my-6 items-center justify-between">
|
|
|
|
|
<div class="text-sm">
|
2025-06-14 00:05:36 +03:00
|
|
|
<% 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)) %>
|
2025-05-28 10:06:06 +03:00
|
|
|
<% else %>
|
2025-06-14 00:05:36 +03:00
|
|
|
<%= 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)) %>
|
2025-05-28 10:06:06 +03:00
|
|
|
<% end %>
|
2026-07-31 10:53:34 +03:00
|
|
|
<%= local_assigns[:left_additional_html] %>
|
2023-06-28 00:22:34 +03:00
|
|
|
</div>
|
2025-04-22 16:32:09 +03:00
|
|
|
<div class="flex items-center space-x-1.5">
|
2025-01-31 23:29:01 +02:00
|
|
|
<%= local_assigns[:right_additional_html] %>
|
|
|
|
|
<div class="join">
|
2026-01-26 18:18:07 +02:00
|
|
|
<% if pagy.previous %>
|
2026-01-27 10:34:18 +02:00
|
|
|
<%= link_to '«', url_for(params: request.query_parameters.merge('page' => pagy.previous)), class: 'join-item btn min-h-full h-10' %>
|
2025-01-31 23:29:01 +02:00
|
|
|
<% else %>
|
|
|
|
|
<span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">«</span>
|
|
|
|
|
<% end %>
|
2025-04-22 16:32:09 +03:00
|
|
|
<span class="join-item btn font-medium uppercase min-h-full h-10">
|
2025-06-14 00:05:36 +03:00
|
|
|
<%= t('page_number', number: pagy.page) %>
|
2025-01-31 23:29:01 +02:00
|
|
|
</span>
|
2025-06-14 00:05:36 +03:00
|
|
|
<% 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 %>
|
2026-01-27 10:34:18 +02:00
|
|
|
<%= link_to '»', url_for(params: request.query_parameters.merge('page' => pagy.next)), class: 'join-item btn min-h-full h-10' %>
|
2025-01-31 23:29:01 +02:00
|
|
|
<% else %>
|
|
|
|
|
<span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">»</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2023-06-24 01:01:54 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|