Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt
Owen Leonard 44aff60fa2
Bug 34852: Use template wrapper for breadcrumbs: OPAC part 2
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.

Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:

- Navigate to /cgi-bin/koha/ilsdi.pl
  - Check a variety of links in the list
- Advanced search
  - Locate a bibliographic record and view the ISBD detail page
  - View the MARC detail page
- Locate a serial record which has a patron notification notice defined
  in its subscription details
  - On the detail view under the "Subscriptions" tab, click the
    "Subscribe to email notification on new issues" button.
    - Confirm the subscription, then when you return to the detail page,
      click "Cancel email notification" to check that view as well.
- Authority search
  - Perform a search which will return results
    - Click the "Details" link on one of the results
      - Also view the "MARC view" tab (note that I didn't address the
        breadcrumb inconsistency between the normal and MARC view in
        this patch).
- Try to view a bibliographic record which is suppressed in the
  OPAC. Requires OpacSuppression enabled and OpacSuppressionRedirect set
  to "An explanatory page"
  - Set the value of 942$n to 1 to suppress it in the OPAC.
- In a system with ElasticSearch enabled, go to "Browse search" (or
  navigate directly to /cgi-bin/koha/opac-browse.pl
- With  OpacBrowser enabled, go to "Browse by hierarchy."

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:58 -03:00

124 lines
6.6 KiB
Text

[% USE Koha %]
[% USE Asset %]
[% USE raw %]
[% USE AdditionalContents %]
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Browse our catalog &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
[% INCLUDE 'bodytag.inc' bodyid='opac-browser' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Browse search</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
<div class="container-fluid">
<div class="row">
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="col-lg-2">
<div id="navigation">
[% INCLUDE 'navigation.inc' %]
</div>
</div>
[% END %]
[% IF ( OpacNav ) %]
<div class="col-10 order-first order-md-first order-lg-2">
[% ELSE %]
<div class="col order-first order-md-first order-lg-2">
[% END %]
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' && Koha.Preference('OpacBrowseSearch') %]
<div id="browse-search" class="maincontent">
<h1>Browse search</h1>
<form>
<legend class="sr-only">Browse search</legend>
<div class="form-row">
<div class="col">
<label for="browse-searchterm">Search for:</label>
<input type="search" id="browse-searchterm" class="form-control" name="searchterm" value="" />
</div> <!-- /.col-12.col-sm-9 -->
<div class="col-auto">
<label for="browse-searchfield">Search type:</label>
<select id="browse-searchfield" name="searchfield" class="form-control">
<option value="author">Author</option>
<option value="subject">Subject</option>
<option value="title">Title</option>
</select>
</div> <!-- /.col-auto -->
</div> <!-- /.form-row -->
<div class="form-row">
<div class="col">
<div id="browse-searchfuzziness">
<div class="form-check form-check-inline">
<label for="exact" class="form-check-label">
<input class="form-check-input" type="radio" name="browse-searchfuzziness" id="exact" value="0" />Exact
</label>
</div> <!-- /.form-check.form-check-inline -->
<div class="form-check form-check-inline">
<label for="fuzzy" class="form-check-label">
<input class="form-check-input" type="radio" name="browse-searchfuzziness" id="fuzzy" value="1" checked="checked" /> Fuzzy
</label>
</div> <!-- /.form-check.form-check-inline -->
<div class="form-check form-check-inline">
<label for="reallyfuzzy" class="form-check-label">
<input class="form-check-input" type="radio" name="browse-searchfuzziness" id="reallyfuzzy" value="2" /> Really fuzzy
</label>
</div> <!-- /.form-check.form-check-inline -->
</div> <!-- /#browse-searchfuzziness -->
</div> <!-- /.col -->
</div> <!-- /.form-row -->
<div class="form-row">
<div class="col">
<button class="btn btn-primary" type="submit" accesskey="s">Search</button>
</div>
</div>
</form>
<div id="browse-suggestionserror" class="alert alert-warning d-none" role="alert">
An error occurred, please try again.
</div>
<div id="browse-resultswrapper" class="d-none">
<h2>Results</h2>
<div class="loading d-none"><img src="[% interface | html %]/[% theme |html %]/images/loading.gif" alt=""> Loading</div>
<div class="alert alert-warning no-results d-none" role="alert">Sorry, there are no results. Try a different search term.</div>
<div class="accordion" id="browse-searchresults">
<div id="card_template" class="card">
<div class="card-header" id="heading">
<a class="expand-result" href="#" data-toggle="collapse" aria-expanded="false" aria-controls="collapse">
</a>
</div> <!-- /#heading.card-header -->
<div id="collapse" class="collapse" aria-labelledby="heading" data-parent="#browse-searchresults">
<div class="card-body">
</div>
</div> <!-- /#collapse.collapse -->
</div> <!-- /#card_template.card -->
</div> <!-- /#browse-searchresults.accordion -->
</div><!-- / #browse-resultswrapper -->
</div><!-- /#browse-search -->
[% ELSE %]
<h1>Browse search</h1>
<div class="alert alert-info">
This feature is not enabled
</div>
[% END %]
</div><!-- / .col/col-10 -->
</div><!-- / .row -->
</div><!-- / .container-fluid -->
</div><!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% Asset.js("/js/browse.js") | $raw %]
[% END %]