File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
app/views/kaminari/blacklight Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1111<%= paginator.render do -%>
1212 <ul class ="pagination ">
1313 <%= prev_page_tag %>
14- <%= next_page_tag %>
14+ <%= next_page_tag if Blacklight :: Engine . config . blacklight . paginator [ :next_page_position ] == :before %>
1515 <% each_relevant_page do |page | -%>
1616 <% if page . left_outer? || page . right_outer? || page . inside_window? -%>
1717 <%= page_tag page %>
1818 <% elsif !page . was_truncated? -%>
1919 <%= gap_tag %>
2020 <% end -%>
2121 <% end -%>
22+ <%= next_page_tag if Blacklight ::Engine . config . blacklight . paginator [ :next_page_position ] == :after %>
2223 </ ul >
2324<% end -%>
Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ class Engine < Rails::Engine
7272 outer_window : 2
7373 }
7474
75+ # Blacklight 9 moves the next button after the page numbers. This behavior can be configured
76+ # in Blacklight 8 by setting the next_button_position to :after
77+ bl_global_config . paginator = {
78+ next_button_position : :before
79+ }
80+
7581 bl_global_config . search_params_permitted_classes = [ ActiveSupport ::HashWithIndifferentAccess , Symbol ]
7682
7783 # Anything that goes into Blacklight::Engine.config is stored as a class
Original file line number Diff line number Diff line change 4747 search_for ''
4848 expect ( page ) . to have_content "1 - 10"
4949 find_all ( '.index_title a' ) . last . click
50+ expect ( page ) . to have_css "h1" , text : "Pluvial nectar"
5051 click_on "Next »"
5152
52- expect ( page ) . to have_content "Naqdī barā-yi tamām-i"
53+ expect ( page ) . to have_css "h1" , text : "Naqdī barā-yi tamām-i"
5354 click_on "Back to Search"
5455 expect ( page ) . to have_content "11 - 20"
5556 end
You can’t perform that action at this time.
0 commit comments