From 13823c988f711dc761f594510b7697e38069ba46 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 3 Oct 2023 05:20:16 +0300 Subject: [PATCH] Highlight current changeset node/way/relation page --- lib/classic_pagination/pagination_helper.rb | 36 ++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/lib/classic_pagination/pagination_helper.rb b/lib/classic_pagination/pagination_helper.rb index ed65944bc..4c233e0b5 100644 --- a/lib/classic_pagination/pagination_helper.rb +++ b/lib/classic_pagination/pagination_helper.rb @@ -151,21 +151,21 @@ module ActionView html << "" @@ -175,15 +175,21 @@ module ActionView private - def bootstrap_page_item(body, url = nil) - if url - content_tag "li", :class => "page-item" do - link_to body, url, :class => "page-link" - end - else - content_tag "li", :class => "page-item disabled" do - content_tag "a", body, :class => "page-link" - end + def bootstrap_page_item_disabled(body) + content_tag "li", :class => "page-item disabled" do + content_tag "span", body, :class => "page-link" + end + end + + def bootstrap_page_item_active(body) + content_tag "li", :class => "page-item active", :'aria-current' => "page" do + content_tag "span", body, :class => "page-link" + end + end + + def bootstrap_page_item_link(body, url) + content_tag "li", :class => "page-item" do + link_to body, url, :class => "page-link" end end end -- 2.39.5