From 6cbb99623a9b9418f6909aeac7be39238be03603 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sun, 28 Apr 2024 04:02:59 +0300 Subject: [PATCH] Add tooltips, make newest/oldest buttons tooltip only --- app/helpers/pagination_helper.rb | 4 ++-- app/views/shared/_pagination.html.erb | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb index e9003780428..b060f1d3ccf 100644 --- a/app/helpers/pagination_helper.rb +++ b/app/helpers/pagination_helper.rb @@ -1,9 +1,9 @@ module PaginationHelper - def pagination_item(params, &block) + def pagination_item(params, title, &block) link_class = "page-link icon-link text-center" page_link_content = capture(&block) if params - page_link = link_to page_link_content, params, :class => link_class, :data => { "turbo-frame" => "pagination", "turbo-action" => "advance" } + page_link = link_to page_link_content, params, :class => link_class, :title => title, :data => { "turbo-frame" => "pagination", "turbo-action" => "advance" } tag.li page_link, :class => "page-item d-flex" else page_link = tag.span page_link_content, :class => link_class diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erb index f8d4554824b..265afc5cce4 100644 --- a/app/views/shared/_pagination.html.erb +++ b/app/views/shared/_pagination.html.erb @@ -1,23 +1,25 @@