Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

315 lines
14 KiB

[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Catalog &rsaquo; Advanced search</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="catalog_advsearch" class="catalog">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'adv-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Advanced search</div>
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
<form action="search.pl" method="get">
<div id="advanced-search">
<input type="hidden" name="advsearch" value="1"/>
<h1>Advanced search</h1>
<p>
<a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
</p>
<!-- SEARCH BUTTONS -->
<div id="toolbar" class="btn-toolbar">
<fieldset class="action" id="submit1">
<div class="btn-group">
<button class="btn btn-default btn-sm" type="submit" accesskey="s"><i class="fa fa-search"></i> Search</button>
</div>
<div class="btn-group">
[% IF ( expanded_options ) %]
<a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0" class="btn btn-sm btn-link"><i class="fa fa-search-minus"></i> Fewer options</a>
</div>
[% ELSE %]
<a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1" class="btn btn-sm btn-link"><i class="fa fa-search-plus"></i> More options</a>
</div>
[% END %]
<div class="btn-group">
<a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options | uri %]" class="btn btn-sm btn-link"><i class="fa fa-trash"></i> Clear fields</a>
</div>
</fieldset>
</div>
<!-- /SEARCH BUTTONS -->
[% IF ( outer_servers_loop ) %]
<!-- DATABASES -->
<fieldset>
<legend>Select local databases</legend>
[% FOREACH local_servers_loo IN local_servers_loop %]
[% IF ( local_servers_loo.checked ) %]<input type="checkbox" id="[% local_servers_loo.id | html %]" name="[% local_servers_loo.name | html %]" checked="checked" value="[% local_servers_loo.value | html %]" />[% ELSE %]<input type="checkbox" id="[% local_servers_loo.id | html %]" name="[% local_servers_loo.name | html %]" value="[% local_servers_loo.value | html %]" />[% END %]<label for="[% local_servers_loo.id | html %]"><img width="16" height="16" alt="[% local_servers_loo.id | html %]" src="[% themelang | html %]/img/[% local_servers_loo.icon | html %]" /> [% local_servers_loo.label | html %]</label>[% END %]
</fieldset>
<!-- /DATABASES -->
[% END %]
[% IF ( outer_servers_loop ) %]
<!-- REMOTE DATABASES -->
<fieldset id="databases">
<legend>Select remote databases</legend>
[% FOREACH outer_servers_loo IN outer_servers_loop %]
[% IF ( outer_servers_loo.checked ) %]<input type="checkbox" id="[% outer_servers_loo.id | html %]" name="[% outer_servers_loo.name | html %]" checked="checked" value="[% outer_servers_loo.value | html %]" />[% ELSE %]<input type="checkbox" id="[% outer_servers_loo.id | html %]" name="[% outer_servers_loo.name | html %]" value="[% outer_servers_loo.value | html %]" />[% END %]
<label for="[% outer_servers_loo.id | html %]"><img alt="[% outer_servers_loo.id | html %]" src="[% themelang | html %]/images/[% outer_servers_loo.icon | html %]" />[% outer_servers_loo.label | html %]</label>
[% END %]
</fieldset>
<!-- /REMOTE DATABASES -->
[% END %]
<!-- BOOLEAN SEARCH OPTIONS -->
<fieldset id="searchterms">
<legend>Search for </legend>
[% FOREACH search_box IN search_boxes_loop %]
[% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
[% 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>
[% END %]
[% END %]
[% INCLUDE 'search_indexes.inc' %]
<input type="text" size="30" name="q" title="Enter search terms" value="" />
[% IF ( expanded_options ) %]
[% IF ( search_box.add_field ) %]
<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
[% END %]
[% IF ( search_box.scan_index ) %]
<label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
[% END %]
[% END %]
</div>
[% END %]
</fieldset>
<!-- /BOOLEAN SEARCH OPTIONS -->
</div>
<!-- MC-TYPE LIMITS -->
<div id="advsearches" class="toptabs">
<ul>
[% FOREACH advsearchloo IN advancedsearchesloop %]
<li id="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
<a href="#advsearch-[% advsearchloo.advanced_search_type | uri %]">
[% 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>
[% FOREACH advsearchloo IN advancedsearchesloop %]
<div id="advsearch-[% advsearchloo.advanced_search_type | html %]" class="advsearch">
<h4>Limit to any of the following:</h4>
<table>
<tr>
[% FOREACH itemtypeloo IN advsearchloo.code_loop %]
<td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />[% END %]&nbsp;[% END %]
[% itemtypeloo.description | html %]</label></td>
[% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
[% END %]
</table>
</div>
[% END %]
<!-- /MC-TYPE LIMIT -->
[% IF ( expanded_options ) %]
<!-- BASIC LIMITS -->
<fieldset id="basiclimits">
<legend>Limits</legend>
<fieldset id="pubrange">
<!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
<p><label for="limit-yr">Year: </label>
<input type="text" size="15" name="limit-yr" id="limit-yr" value=""/>&nbsp;&nbsp;(format: yyyy-yyyy)</p>
<!-- /PUB / COPY YEAR LIMIT -->
</fieldset>
<fieldset id="language">
<!-- LANGUAGE LIMIT -->
<p><label for="language-limit">Language: </label>
<select name="limit" id="language-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 | html %]" selected="selected">[% search_languages_loo.language_description | html %]</option>
[% ELSE %]
<option value="ln,rtrn:[% search_languages_loo.iso639_2_code | html %]">[% search_languages_loo.language_description | html %]</option>
[% END %]
[% END %]
</select></p><!-- <a href="">Show all languages</a>-->
<!-- /LANGUAGE LIMIT -->
</fieldset>
</fieldset>
<!-- /BASIC LIMITS -->
[% END %]
[% IF ( UNIMARC ) %]
[% INCLUDE 'subtypes_unimarc.inc' %]
[% ELSE %]
<!-- SUBTYPE LIMITS -->
<fieldset id="subtype">
<legend>Subtype limits</legend><p>
<select name="limit" class="subtype">
<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="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</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>
</p>
</fieldset>
[% END %]
<!-- AVAILABILITY LIMITS -->
<fieldset id="availability"><legend>Location and availability</legend>
<fieldset id="currently-avail">
<p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
</fieldset>
<fieldset id="select-libs">
<p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop">
<option value="">All libraries</option>
[%# FIXME Should not we filter the libraries displayed? %]
[% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
</select></p>
<!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
[% IF search_groups %]
<p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
<p>
<label for="categoryloop">Groups of libraries: </label>
<select name="multibranchlimit" id="categoryloop">
<option value=""> -- none -- </option>
[% FOREACH sg IN search_groups %]
[% UNLESS sg.branchcode %]
<option value="[% sg.id | html %]">[% sg.title | html %]</option>
[% END %]
[% END %]
</select>
</p>
[% END %]
</fieldset>
</fieldset>
<!-- /AVAILABILITY LIMITS -->
<!-- RANK LIMITS -->
<fieldset id="sortby"><legend>Sorting</legend>
<p>
<label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by">
[% INCLUDE 'resort_form.inc' %]
</select>
</p>
</fieldset>
</div>
<!-- /RANK LIMITS -->
</form>
</div>
</div>
[% MACRO jsinclude BLOCK %]
[% Asset.js("lib/hc-sticky.js") | $raw %]
<script type="text/JavaScript">
/**
* Function add_field();
* This function allows to display a new field to search.
*/
function add_field() {
var ButtonPlus = document.getElementById("ButtonPlus");
var line = ButtonPlus.parentNode;
var dad = line.parentNode;
dad.appendChild(line.cloneNode(true));
line.removeChild(ButtonPlus);
}
var Sticky;
$(document).ready(function() {
$("input[name=q]:eq(0)").focus();
$('#advsearches').tabs();
Sticky = $("#toolbar");
Sticky.hcSticky({
stickTo: ".main",
stickyClass: "floating"
});
$("#branchloop").on("change",function(){
if( this.value != ""){
document.getElementById("categoryloop").disabled=true;
} else {
document.getElementById("categoryloop").disabled=false;
}
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]