Bug 28035: Improve breadcrumbs of cataloging search page

This patch expands the logic around the cataloging search page's
breadcrumbs so that more context is provided in the breadcrumbs menu.

The page title should also reflect this change.

Some markup in the body of the page has been updated to clarify the page
structure using headings.

To test, apply the patch and go to Cataloging.

 - The page title and breadcrumbs menu should show "Home > Cataloging"
 - Perform a search which will return results from the catalog, from the
   reservoir, or both. The page title and breadcrumbs menu should show:
   "Home > Cataloging > Search results."
 - Perform a search which will return no results. The page
   title and breadcrumbs should be: "Home > Cataloging > No results
   found."

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2021-03-25 16:44:33 +00:00 committed by Jonathan Druart
parent da2d583591
commit dc13552ddc
1 changed files with 33 additions and 11 deletions

View File

@ -2,7 +2,7 @@
[% USE Koha %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Cataloging</title>
<title>Koha &rsaquo; Cataloging [% IF ( total || breeding_loop ) %] &rsaquo; Search results [% ELSIF ( query ) %] &rsaquo; No results found [% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -15,11 +15,27 @@
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="#" aria-current="page">
Cataloging
</a>
</li>
[% IF ( total || breeding_loop ) %]
<li>
<a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
</li>
<li>
<a href="#" aria-current="page">Search results</a>
</li>
[% ELSIF ( query ) %]
<li>
<a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
</li>
<li>
<a href="#" aria-current="page">No results found</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Cataloging
</a>
</li>
[% END %]
</ol>
</nav>
@ -67,7 +83,9 @@
[%# display the search results %]
[% IF ( total ) %]
<h1>Records found in the catalog</h1>
<div>
[% total | html %] result(s) found in catalog,
<a href="#searchresult-breeding">[% breeding_count | html %] result(s) found in reservoir</a>
@ -160,20 +178,24 @@
[% END # /FOREACH resultsloo %]
</table>
<div class="pages">[% pagination_bar | $raw %]</div>
<hr />
</div> <!-- /.searchresults -->
[% ELSE # IF total %]
[% IF ( query ) %]
[% IF ( error ) %]<div class="dialog alert">[% END %]<strong>No results found</strong>
[% IF ( error ) %]
Error: <span class="error">[% error | html %]</span></div>
<div class="dialog alert">
[% END %]
<h3>No results found</h3>
[% IF ( error ) %]
Error: <span class="error">[% error | html %]</span>
</div>
[% END %]
[% END %]
[% END # /IF total %]
[% IF ( query ) %]
<hr />
<div id="searchresult-breeding">
<h3>Biblios in reservoir</h3>
<h2>Records found in the reservoir</h2>
[% IF ( breeding_loop ) %]
<table>
<tr>
@ -212,7 +234,7 @@
[% END # /IF breeding_loo %]
</table>
[% ELSE %]
<p>None</p>
<h3 id="searchresult-breeding">No results found</h3>
[% END # /IF breeding_loop %]
</div>
[% END # /IF query %]