Koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl
Jared Camins-Esakov 0a1f05a5a2 Bug 5390: OPAC loses library selection
This patch ensures that the OPAC library selection masthead will always default
to the branch that is currently being searched. This only applies to systems
with multiple branches and OpacAddMastheadLibraryPulldown turned on.

To test: do a search in the OPAC, limiting by branch. The search results will
still have that branch selected in the masthead dropdown.

This patch also fixes bug 5852 and bug 3778.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-22 14:59:16 +13:00

291 lines
15 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF -->
Catalog &rsaquo; Advanced Search
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
</head>
<body id="advsearch"><div id="doc3" class="yui-t7">
<div id="bd">
<!-- TMPL_INCLUDE name="masthead.inc" -->
<form action="/cgi-bin/koha/opac-search.pl" method="get">
<div class="yui-g">
<!-- TMPL_IF NAME="if_expanded_options_actually_worked" -->
<div id="databases" class="container"> <!-- TMPL_IF NAME="outer_servers_loop" -->
<!-- DATABASES -->
<fieldset>
<legend>Select local databases:</legend>
<!-- TMPL_LOOP NAME="outer_servers_loop" -->
<!-- TMPL_LOOP NAME="inner_servers_loop" -->
<!-- TMPL_IF NAME="checked" --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" checked="<!-- TMPL_VAR NAME="checked" -->" value="<!-- TMPL_VAR NAME="value" -->" /><!-- TMPL_ELSE -->
<input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" /><!-- /TMPL_IF -->
<label for="<!-- TMPL_VAR NAME="id" -->"><img width="16" height="16" alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="icon" -->" /> <!-- TMPL_VAR NAME="label" --></label>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
</fieldset>
<!-- /DATABASES -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="outer_sup_servers_loop" -->
<!-- REMOTE DATABASES -->
<fieldset>
<legend>Select remote databases:</legend>
<!-- TMPL_LOOP NAME="outer_sup_servers_loop" -->
<!-- TMPL_LOOP NAME="inner_sup_servers_loop" -->
<!-- TMPL_IF NAME="checked" --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" checked="<!-- TMPL_VAR NAME="checked" -->" value="<!-- TMPL_VAR NAME="value" -->" /><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" />
<!-- /TMPL_IF -->
<label for="<!-- TMPL_VAR NAME="id" -->"><img alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="icon" -->" /><!-- TMPL_VAR NAME="label" --></label>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
</fieldset>
<!-- /REMOTE DATABASES -->
<!-- /TMPL_IF --></div>
<!-- /TMPL_IF -->
<!-- BOOLEAN SEARCH OPTIONS -->
<div id="booleansearch" class="container"><fieldset>
<legend>Search for:</legend>
<!-- TMPL_LOOP NAME="search_boxes_loop" -->
<p>
<!-- TMPL_IF NAME="expanded_options" -->
<!-- TMPL_IF NAME="boolean" -->
<select name="op">
<option value="and" selected="selected">and</option>
<option value="or">or</option>
<option value="not">not</option>
</select>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="expanded_options" --><!-- TMPL_VAR NAME="left_content" --><!-- /TMPL_IF -->
<select name="idx">
<option value="kw">Keyword</option>
<option value="su,wrdl">Subject</option>
<!-- TMPL_IF NAME="expanded_options" -->
<option value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject Phrase</option>
<!-- /TMPL_IF -->
<option value="ti">Title</option>
<!-- TMPL_IF NAME="expanded_options" -->
<option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title Phrase</option>
<option value="se,wrdl">Series Title</option>
<option value="callnum">Call Number</option>
<!-- /TMPL_IF -->
<option value="au,wrdl">Author</option>
<!-- TMPL_IF NAME="expanded_options" -->
<option value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author Phrase</option>
<option value="cpn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Corporate Name</option>
<option value="cfn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Conference Name</option>
<option value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference Name Phrase</option>
<option value="pn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Personal Name</option>
<option value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal Name Phrase</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="expanded_options" -->
<option value="nt">Notes/Comments</option>
<option value="curriculum">Curriculum</option>
<!-- /TMPL_IF -->
<option value="pb,wrdl">Publisher</option>
<option value="pl,wrdl">Publisher Location</option>
<!-- TMPL_IF NAME="expanded_options" -->
<option value="sn">Standard Number</option>
<option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
<option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
<option value="lcn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call Number</option>
<!-- TMPL_ELSE -->
<option value="nb">ISBN</option>
<!-- /TMPL_IF -->
<option value="bc">Barcode</option>
</select>
<input type="text" size="30" name="q" title="Enter search terms" value="" />
<!-- TMPL_IF NAME="expanded_options" -->
<!-- <!-- TMPL_IF NAME="scan_index" --><input type="checkbox" name="scan" id="scan" value="1" /> Scan Indexes<!-- /TMPL_IF --> -->
<!-- TMPL_IF NAME="add_field" --><a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</p>
<!-- /TMPL_LOOP -->
</fieldset></div>
</div>
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
<input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
<!-- TMPL_IF NAME="expanded_options" -->
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer Options]</a>
<!-- TMPL_ELSE -->
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
<!-- /TMPL_IF -->
<a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New Search]</a>
<!-- /SEARCH BUTTONS --></div></div>
<div class="yui-g">
<div id="pubrange" class="container">
<fieldset>
<!-- PUB RANGE OPTION -->
<legend>Publication Date Range:</legend>
<span>For example: 1999-2001. You could also use "-1987" for everything published before 1987 or "2008-" for everything published after 2008.</span>
<input type="text" size="30" name="limit-yr" title="Enter search terms" value="" />
</fieldset>
<!-- /PUB RANGE OPTION -->
</div>
</div>
<div class="yui-g">
<!-- /BOOLEAN SEARCH OPTIONS -->
<div id="advsearch-itemtype" class="container">
<fieldset>
<legend>Limit to any of the following:</legend>
<table>
<tr>
<!--TMPL_LOOP Name="itemtypeloop"-->
<td><input type="checkbox" id="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->" name="limit" value="mc-<!-- TMPL_VAR NAME="ccl" -->:<!--TMPL_VAR Name="code" -->"/><label for="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->"><!-- TMPL_UNLESS NAME="noItemTypeImages" --><!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->&nbsp;<!-- /TMPL_UNLESS -->
<!--TMPL_VAR Name="description" --></label></td>
<!-- TMPL_UNLESS name="count5" --><!-- TMPL_UNLESS name="__last__" --></tr><tr><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS -->
<!--/TMPL_LOOP-->
</tr>
</table>
</fieldset>
</div>
<fieldset><legend>Language</legend>
<!-- LANGUAGE LIMIT -->
<p><label for="language-limit">Language: </label>
<select name="limit">
<option value="">No Limit</option>
<!-- TMPL_LOOP NAME="search_languages_loop" -->
<!-- TMPL_IF NAME="selected" -->
<option value="ln,rtrn:<!-- TMPL_VAR NAME="iso639_2_code" -->" selected="selected"><!-- TMPL_VAR NAME="language_description" --></option>
<!-- TMPL_ELSE -->
<option value="ln,rtrn:<!-- TMPL_VAR NAME="iso639_2_code" -->"><!-- TMPL_VAR NAME="language_description" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></p><!-- <a href="">Show all languages</a>-->
<!-- /LANGUAGE LIMIT -->
</fieldset>
<!-- TMPL_IF NAME="expanded_options" -->
<!--TMPL_IF Name="usmarc"-->
<!-- SUBTYPE LIMITS -->
<div id="subtypes" class="container"><fieldset>
<legend>Subtype limits</legend><select name="limit" class="subtype">
<option value="" selected="selected" class="menuheader">Any Audience</option>
<option value="aud:a">Easy</option>
<option value="aud:c">Juvenile</option>
<option value="aud:d">Young Adult</option>
<option value="aud:e">Adult</option>
</select>
<select name="limit" class="subtype">
<option value="" selected="selected" class="menuheader">Any Content</option>
<option value="fic:1">Fiction</option>
<option value="fic:0">Non Fiction</option>
<option value="bio:b">Biography</option>
<option value="mus:j">Musical recording</option>
<option value="mus:i">Non-musical recording</option>
</select>
<select name="limit" class="subtype">
<option value="" selected="selected" class="menuheader">Any Format</option>
<option value="l-format:ta">Regular print</option>
<option value="l-format:tb">Large print</option>
<option value="l-format:fk">Braille</option>
<option value="">-----------</option>
<option value="l-format:sd">CD audio</option>
<option value="l-format:ss">Cassette recording</option>
<option value="l-format:vf">VHS tape / Videocassette</option>
<option value="l-format:vd">DVD video / Videodisc</option>
<option value="l-format:co">CD Software</option>
<option value="l-format:cr">Website</option>
</select>
<select name="limit" class="subtype">
<option value="">Additional Content Types for Books/Printed Materials</option>
<option value="ctype:a">Abstracts/summaries</option>
<option value="ctype:b">Bibliographies</option>
<option value="ctype:c">Catalogs</option>
<option value="ctype:d">Dictionaries</option>
<option value="ctype:e">Encyclopedias </option>
<option value="ctype:f">Handbooks</option>
<option value="ctype:g">Legal articles</option>
<option value="ctype:i">Indexes</option>
<option value="ctype:j">Patent document</option>
<option value="ctype:k">Discographies</option>
<option value="ctype:l">Legislation</option>
<option value="ctype:m">Theses</option>
<option value="ctype:n">Surveys</option>
<option value="ctype:o">Reviews</option>
<option value="ctype:p">Programmed texts</option>
<option value="ctype:q">Filmographies</option>
<option value="ctype:r">Directories</option>
<option value="ctype:s">Statistics</option>
<option value="ctype:t">Technical reports</option>
<option value="ctype:v">Legal cases and case notes</option>
<option value="ctype:w">Law reports and digests</option>
<option value="ctype:z">Treaties </option>
</select>
</fieldset></div>
<!--/TMPL_IF -->
<!--TMPL_IF Name="UNIMARC" -->
<div id="subtypes_unimarc" class="container"><!-- SUBTYPE LIMITS -->
<!-- TMPL_INCLUDE NAME="subtypes_unimarc.inc" --></div>
<!--/TMPL_IF-->
<!--/TMPL_IF-->
</div>
<div class="yui-g">
<div class="yui-u first">
<!-- AVAILABILITY LIMITS -->
<!-- TMPL_UNLESS NAME="singleBranchMode" -->
<div id="location" class="container"><fieldset><legend>Location and availability: </legend>
<select name="limit" id="branchloop">
<option value="">All libraries</option>
<!-- TMPL_LOOP NAME="BranchesLoop" -->
<!--TMPL_IF Name="selected"-->
<option value="branch:<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
<!--TMPL_ELSE-->
<option value="branch:<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!--/TMPL_IF-->
<!-- /TMPL_LOOP -->
</select>
<div style="margin-top:.4em"><label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label></div>
</fieldset></div>
<!-- /TMPL_UNLESS -->
<!-- /AVAILABILITY LIMITS -->
</div>
<div class="yui-u">
<!-- RANK LIMITS -->
<div id="sortby" class="container"><fieldset><legend>Sort by: </legend>
<select id="sort_by" name="sort_by">
<!--TMPL_INCLUDE NAME="resort_form.inc" -->
</select></fieldset></div>
<!-- RANK LIMITS -->
</div>
</div>
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
<input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
<!-- TMPL_IF NAME="expanded_options" -->
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer Options]</a>
<!-- TMPL_ELSE -->
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
<!-- /TMPL_IF -->
<a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New Search]</a>
<!-- /SEARCH BUTTONS --></div></div>
</form>
<script type="text/javascript" language="javascript">
/* This function allows to display a new field to search.
*/
function add_field() {
var ButtonPlus = document.getElementById('ButtonPlus');
var line = ButtonPlus.parentNode;
line.parentNode.appendChild(line.cloneNode(true));
line.removeChild(ButtonPlus);
}
</script>
</div>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->