Bug 38462: Remove unused code for pagination in OPAC authority search

The remote branch for bug 13618 started out when OPAC authority search did its
own pagination in a template block, then bug 2735 replaced that with
pagination_bar, the template var passed from the script, then at some point
before bug 13618 landed the second time, a rebase error put the template block
back in. And since it's not at all obvious it is dead code unless you look for
where "pagination" rather than "pagination_bar" is used, we've kept updating
it, and bug 36032 thought the way it used >> instead of > for next ought to be
fixed while one that was actually used was fixed.

Time to get rid of it, before we 'fix' it again.

Test plan:
 1. Without the patch, in the OPAC go to Authority Search and do a search that
    will return pages of results, like the letter a
 2. Note that the button for the next page uses ">" rather than the "Next >>"
    in the block this patch removes
 3. Apply patch, click the browser Back button, refresh page
 4. Verify that when you search for something that returns more than one
    page of results, the page navigation hasn't changed from what it was
    before the patch, telling you that what the patch removes was unused

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Phil Ringnalda 2024-11-15 14:28:32 -08:00 committed by Katrin Fischer
parent 907118e9b0
commit 8c9fd0f5d3
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -8,37 +8,6 @@
[% PROCESS 'opac-authorities.inc' %]
[% PROCESS 'authorities-search-results.inc' %]
[% PROCESS 'i18n.inc' %]
[% BLOCK pagination %]
<nav class="pagination pagination-sm noprint" aria-label="Search results pagination">
<ul class="pagination">
[% IF ( displayprev ) %]
<li class="page-item">
<a class="page-link" href="opac-authorities-home.pl?startfrom=[% startfromprev | uri %]&amp;[% FOREACH searchdat IN searchdata %][% searchdat.term | uri %]=[% searchdat.val |url %]&amp;[% END %]resultsperpage=[% resultsperpage | uri %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode | uri %]&amp;orderby=[% orderby | uri %]" aria-label="Go to the previous page">
<i class="fa fa-fw fa-angle-left" aria-hidden="true"></i> Previous
</a>
</li>
[% END %]
[% FOREACH number IN numbers %]
[% IF ( number.highlight ) %]
<li class="page-item active" aria-current="page">
<a class="page-link" href="#" aria-label="Current page: Page [% number.number | html %]">[% number.number | html %]</a>
</li>
[% ELSE %]
<li class="page-item">
<a class="page-link" href="opac-authorities-home.pl?startfrom=[% number.startfrom | uri %]&amp;[% FOREACH searchdat IN number.searchdata %][% searchdat.term | uri %]=[% searchdat.val |url %]&amp;[% END %]resultsperpage=[% resultsperpage | uri %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode | uri %]&amp;orderby=[% orderby | uri %]" aria-label="Go to page [% number.number | html %]">[% number.number | html %]</a>
</li>
[% END %]
[% END %]
[% IF ( displaynext ) %]
<li class="page-item">
<a class="page-link" href="opac-authorities-home.pl?startfrom=[% startfromnext | uri %]&amp;[% FOREACH searchdat IN searchdata %][% searchdat.term | uri %]=[% searchdat.val |url %]&amp;[% END %]&amp;resultsperpage=[% resultsperpage | uri %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode | uri %]&amp;orderby=[% orderby | uri %]" aria-label="Go to the next page">
Next <i class="fa fa-fw fa-angle-double-right" aria-hidden="true"></i>
</a>
</li>
[% END %]
</ul>
</nav> <!-- / #pages -->
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
[% t("Results") | html %] &rsaquo;