+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
-[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %]
- Catalog › Advanced Search
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %]
+ catalog › Advanced search
[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" language="javascript">//<![CDATA[
+ $(document).ready(function() {
+ $('#advsearches').tabs();
+});
+ //]]>
+</script>
</head>
<body id="advsearch"><div id="doc3" class="yui-t7">
<div id="bd">
[% INCLUDE 'masthead.inc' %]
-
+<div id="yui-main">
<form action="/cgi-bin/koha/opac-search.pl" method="get">
<div class="yui-g">
[% IF ( if_expanded_options_actually_worked ) %]
<p>
[% IF ( expanded_options ) %]
[% IF ( search_box.boolean ) %]
- <select name="op">
- <option value="and" selected="selected">and</option>
- <option value="or">or</option>
- <option value="not">not</option>
- </select>
+ <select name="op">
+ <option value="and" selected="selected">and</option>
+ <option value="or">or</option>
+ <option value="not">not</option>
+ </select>
+ [% END %]
+ [% ELSE %]
+ <label for="search-field_[% loop.index %]">
+ [% IF loop.index == 0 %]
+
+ [% ELSE %]
+ and
+ [% END %]
+ </label>
[% END %]
- [% END %]
[% IF ( expanded_options ) %][% left_content %][% END %]
- <select name="idx">
+ <select name="idx" id="search-field_[% loop.index %]">
<option value="kw">Keyword</option>
<option value="su,wrdl">Subject</option>
-[% IF ( search_boxes_loo.expanded_options ) %]
- <option value="su,phr"> Subject Phrase</option>
+[% IF ( expanded_options ) %]
+ <option value="su,phr"> Subject phrase</option>
+ <option value="su-br"> Subject and broader terms</option>
+ <option value="su-na"> Subject and narrower terms</option>
+ <option value="su-rl"> Subject and related terms</option>
[% END %]
<option value="ti">Title</option>
[% IF ( expanded_options ) %]
- <option value="ti,phr"> Title Phrase</option>
- <option value="se,wrdl">Series Title</option>
- <option value="callnum">Call Number</option>
- <option value="location">Shelving Location</option>
+ <option value="ti,phr"> Title phrase</option>
+ <option value="se,wrdl">Series title</option>
+ [% IF ( numbersphr) %]
+ <option value="callnum,phr">Call number</option>
+ [% ELSE %]
+ <option value="callnum">Call number</option>
+ [% END %]
+ <option value="location">Shelving location</option>
[% END %]
<option value="au,wrdl">Author</option>
[% IF ( expanded_options ) %]
- <option value="au,phr"> Author Phrase</option>
- <option value="cpn,wrdl"> Corporate Name</option>
- <option value="cfn,wrdl"> Conference Name</option>
- <option value="cfn,phr"> Conference Name Phrase</option>
- <option value="pn,wrdl"> Personal Name</option>
- <option value="pn,phr"> Personal Name Phrase</option>
+ <option value="au,phr"> Author phrase</option>
+ <option value="cpn,wrdl"> Corporate name</option>
+ <option value="cfn,wrdl"> Conference name</option>
+ <option value="cfn,phr"> Conference name phrase</option>
+ <option value="pn,wrdl"> Personal name</option>
+ <option value="pn,phr"> Personal name phrase</option>
[% END %]
[% IF ( expanded_options ) %]
<option value="nt">Notes/Comments</option>
+ [% IF (marcflavour != 'UNIMARC') %]
<option value="curriculum">Curriculum</option>
+ [% END %]
[% END %]
<option value="pb,wrdl">Publisher</option>
- <option value="pl,wrdl">Publisher Location</option>
+ <option value="pl,wrdl">Publisher location</option>
[% IF ( expanded_options ) %]
- <option value="sn">Standard Number</option>
+ [% IF ( numbersphr) %]
+ <option value="sn,phr">Standard number</option>
+ [% ELSE %]
+ <option value="sn">Standard number</option>
+ [% END %]
<option value="nb"> ISBN</option>
<option value="ns"> ISSN</option>
- <option value="lcn,phr"> Call Number</option>
+ [% IF ( numbersphr) %]
+ <option value="lcn,phr"> Call number</option>
+ [% ELSE %]
+ <option value="lcn"> Call number</option>
+ [% END %]
[% ELSE %]
<option value="nb">ISBN</option>
[% END %]
<input type="text" size="30" name="q" title="Enter search terms" value="" />
[% IF ( expanded_options ) %]
<!-- [% IF ( search_box.scan_index ) %]<input type="checkbox" name="scan" id="scan" value="1" /> Scan Indexes[% END %] -->
- [% IF ( search_box.add_field ) %]<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>[% END %]
+ [% IF ( !loop.first ) %]
+ <a class="ButtonPlus" name="ButtonPlus" title="Add another field" href="#">[+]</a>
+ <a class="ButtonLess" title="Remove field" href="#">[-]</a>
+ [% END %]
[% END %]
</p>
[% END %]
<input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
[% IF ( expanded_options ) %]
- <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer Options]</a>
+ <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
[% ELSE %]
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
[% END %]
- <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New Search]</a>
+ <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>
+<legend>Publication date range:</legend>
+<p>For example: 1999-2001. You could also use "-1987" for everything published in and before 1987 or "2008-" for everything published in 2008 and after.</p>
<input type="text" size="30" name="limit-yr" title="Enter search terms" value="" />
</fieldset>
<!-- /PUB RANGE OPTION -->
</div>
</div>
<div class="yui-g">
+ <div id="advsearches" class="toptabs">
+ <ul>
+ [% FOREACH advsearchloo IN advancedsearchesloop %]
+ <li id="advsearch-tab-[% advsearchloo.advanced_search_type %]">
+ <a href="#advsearch-[% advsearchloo.advanced_search_type %]">
+ [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
+ [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
+ [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
+ [% ELSE %]Something else
+ [% END %]
+ </a>
+ </li>
+ [% END %]
+ </ul>
<!-- /BOOLEAN SEARCH OPTIONS -->
- <div id="advsearch-itemtype" class="container">
+ [% FOREACH advsearchloo IN advancedsearchesloop %]
+ <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="container advsearch">
<fieldset>
<legend>Limit to any of the following:</legend>
<table>
<tr>
- [% FOREACH itemtypeloo IN itemtypeloop %]
- <td><input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %] [% END %]
+ [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
+ <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %] [% END %]
[% itemtypeloo.description %]</label></td>
- [% UNLESS ( itemtypeloo.count5 ) %][% UNLESS ( loop.last ) %]</tr><tr>[% END %][% END %]
+ [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
[% END %]
- </tr>
</table>
</fieldset>
</div>
+ [% END %]
+ </div>
+ <div id="langfilter">
<fieldset><legend>Language</legend>
<!-- LANGUAGE LIMIT -->
<p><label for="language-limit">Language: </label>
- <select name="limit">
- <option value="">No Limit</option>
+ <select id="language-limit" name="limit">
+ <option value="">No limit</option>
[% FOREACH search_languages_loo IN search_languages_loop %]
[% IF ( search_languages_loo.selected ) %]
<option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]" selected="selected">[% search_languages_loo.language_description %]</option>
</select></p><!-- <a href="">Show all languages</a>-->
<!-- /LANGUAGE LIMIT -->
</fieldset>
+ </div>
[% IF ( expanded_options ) %]
[% IF ( 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="" selected="selected" class="menuheader">Any audience</option>
+ <option value="aud:a">Preschool</option>
+ <option value="aud:b">Primary</option>
+ <option value="aud:c">Pre-adolescent</option>
+ <option value="aud:d">Adolescent</option>
<option value="aud:e">Adult</option>
+ <option value="aud:f">Specialized</option>
+ <option value="aud:g">General</option>
+ <option value="aud:j">Juvenile</option>
</select>
-
+
<select name="limit" class="subtype">
- <option value="" selected="selected" class="menuheader">Any Content</option>
+ <option value="" selected="selected" class="menuheader">Any content</option>
<option value="fic:1">Fiction</option>
- <option value="fic:0">Non 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 name="limit" class="subtype">
- <option value="" selected="selected" class="menuheader">Any Format</option>
+ <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="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: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="">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>
<!-- AVAILABILITY LIMITS -->
[% UNLESS ( singleBranchMode ) %]
<div id="location" class="container"><fieldset><legend>Location and availability: </legend>
-
+
+ <label for="branchloop">Library:</label>
<select name="limit" id="branchloop">
<option value="">All libraries</option>
[% FOREACH BranchesLoo IN BranchesLoop %]
</select>
[% IF ( searchdomainloop ) %]
<p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
- <label for="categoryloop">Groups of Libraries</label><select name="multibranchlimit" id="categoryloop">
+ <label for="categoryloop">Groups of libraries</label><select name="multibranchlimit" id="categoryloop">
<option value=""> -- none -- </option>
[% FOREACH searchdomainloo IN searchdomainloop %]
<option value="[% searchdomainloo.categorycode %]">[% searchdomainloo.categoryname %]</option>
</div>
<div class="yui-u">
<!-- RANK LIMITS -->
- <div id="sortby" class="container"><fieldset><legend>Sort by: </legend>
- <select id="sort_by" name="sort_by">
+ <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
+ <label for="sort_by">Sort by:</label> <select id="sort_by" name="sort_by">
[% INCLUDE 'resort_form.inc' %]
</select></fieldset></div>
<!-- RANK LIMITS -->
<input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
[% IF ( expanded_options ) %]
- <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer Options]</a>
+ <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
[% ELSE %]
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
[% END %]
- <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New Search]</a>
+ <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
<!-- /SEARCH BUTTONS --></div></div>
</form>
-
+</div>
<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);
- }
+ $(document).on("click", '.ButtonPlus', function(e) {
+ e.preventDefault();
+ $('.ButtonLess').show();
+ var thisLine = $(this).parent();
+ var newLine = thisLine.clone();
+ newLine.find('input').val('');
+ thisLine.after(newLine);
+ });
+
+ $(document).on("click", '.ButtonLess', function(e) {
+ e.preventDefault();
+ if($(this).parent().siblings().length <= 3 ) {
+ $('.ButtonLess').hide();
+ }
+ $(this).parent().remove();
+ });
</script>
</div>