From: Anton Khorev Date: Tue, 3 Oct 2023 02:20:16 +0000 (+0300) Subject: Highlight current changeset node/way/relation page X-Git-Tag: live~742^2~8 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/13823c988f711dc761f594510b7697e38069ba46 Highlight current changeset node/way/relation page --- 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