ba9c71f04f
After doing a search and going to the details page, it can sometimes be difficult to see exactly *why* a record was returned by a search. By highlighting matches on the detail page as well as the results page, we make it much easier to figure that out. This patch uses a query_desc CGI parameter which is inserted into links from the results page with javascript. This serves to avoid the potential privacy implications of a cookie, and ensures that users without javascript enabled see no change whatsoever. To test: 1) Do a search (or two) in the OPAC with OpacHighlightedWords on. 2) View a record or two of the results, and ensure that the correct words are highlighted. 3) Disable OpacHighlightedWords and do another search (or two), this time ensuring that no words are highlighted. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
72 lines
3.5 KiB
HTML
72 lines
3.5 KiB
HTML
<ul id="action">
|
|
[% UNLESS ( norequests ) %]
|
|
[% IF ( opacuserlogin ) %]
|
|
[% IF ( RequestOnOpac ) %]
|
|
[% IF ( AllowOnShelfHolds ) %]
|
|
<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place hold</a></li>
|
|
[% ELSE %]
|
|
[% IF ( ItemsIssued ) %]
|
|
<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place hold</a></li>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
<li><a class="print" href="#" onclick="window.print();">Print</a></li>
|
|
[% IF ( virtualshelves ) %]
|
|
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
|
|
<li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
|
|
Save to your lists
|
|
</a></li>
|
|
[% END %][% END %]
|
|
[% END %]
|
|
[% IF ( opacbookbag ) %]
|
|
[% IF ( incart ) %]
|
|
<li><a class="incart cart[% biblionumber %]" href="#" onclick="addRecord('[% biblionumber %]'); return false;">In your cart</a> <a class="cartRemove cartR[% biblionumber %]" href="#" onclick="delSingleRecord('[% biblionumber %]'); return false;">(remove)</a></li>
|
|
[% ELSE %]
|
|
<li><a class="addtocart cart[% biblionumber %]" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to your cart</a> <a style="display:none;" class="cartRemove cartR[% biblionumber %]" href="#" onclick="delSingleRecord('[% biblionumber %]'); return false;">(remove)</a></li>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( OpacHighlightedWords && query_desc ) %]
|
|
<li>
|
|
<a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
|
|
<a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
|
|
</li>
|
|
[% END %]
|
|
<li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
|
|
</ul>
|
|
|
|
[% IF ( OPACSearchForTitleIn ) %]
|
|
<div id="furtherm" class="yuimenu">
|
|
<div class="bd">
|
|
<h4>Search for this title in:</h4>
|
|
<ul class="first-of-type">
|
|
[% OPACSearchForTitleIn %]
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( export_options.size ) %]
|
|
<div id="export" class="detailtagcell">
|
|
<form method="get" action="/cgi-bin/koha/opac-export.pl">
|
|
<label for="format">Save record:</label>
|
|
<select name="format" id="format">
|
|
[% FOREACH option IN export_options %]
|
|
[% SWITCH option %]
|
|
[% CASE 'bibtex' %]<option value="bibtex">BIBTEX</option>
|
|
[% CASE 'dc' %]<option value="dc">Dublin Core (XML)</option>
|
|
[% CASE 'marcxml' %]<option value="marcxml">MARCXML</option>
|
|
[% CASE 'marc8' %]<option value="marc8">MARC (non-Unicode/MARC-8)</option>
|
|
[% CASE 'utf8' %]<option value="utf8">MARC (Unicode/UTF-8)</option>
|
|
[% CASE 'marcstd' %]<option value="marcstd">MARC (Unicode/UTF-8, Standard)</option>
|
|
[% CASE 'mods' %]<option value="mods">MODS (XML)</option>
|
|
[% CASE 'ris' %]<option value="ris">RIS</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<input type="hidden" name="op" value="export" />
|
|
<input type="hidden" name="bib" value="[% biblionumber %]" />
|
|
<input type="submit" name="save" value="Go" /></form>
|
|
</div>
|
|
[% END %]
|