Bug 18005: Re-styled pagination on search results with Bootstrap
authorJosef Moravec <josef.moravec@gmail.com>
Wed, 18 Jan 2017 12:36:37 +0000 (12:36 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 7 Feb 2017 17:48:10 +0000 (17:48 +0000)
Test plan:
0. Don't apply path
1. Make catalogue search in staff client with more then 20 results,
    scroll down to see that pagination is broken
2. Apply the patch
3. Make similar search and confirm, the pagination looks OK with new
style

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc

index a9da2ee..6b22201 100644 (file)
@@ -2637,6 +2637,10 @@ code {
     padding: 0;
 }
 
+.pagination > li > a, .pagination > li > span {
+    font-weight: bold;
+}
+
 /* End Bootstrap overrides */
 
 .waiting {
index 2992164..bf277c0 100644 (file)
@@ -1,7 +1,7 @@
-[% IF ( PAGE_NUMBERS ) %]<div class="pages">
+[% IF ( PAGE_NUMBERS ) %]<nav><ul class="pagination">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset.defined ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">&lt;&lt; Previous</a>[% END %]
-    [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
+        [% IF ( previous_page_offset.defined ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">&lt;&lt; Previous</a></li>[% END %]
+    [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<li class="active"><span>[% PAGE_NUMBER.pg %]</span></li>[% ELSE %]<li><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">[% PAGE_NUMBER.pg %]</a></li>[% END %]
     [% END %]
-        [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">Next &gt;&gt;</a>[% END %]
-</div>[% END %]
+        [% IF ( next_page_offset ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">Next &gt;&gt;</a></li>[% END %]
+</ul></nav>[% END %]