('OpacBrowseResults','1',NULL,'Disable/enable browsing and paging search results from the OPAC detail page.','YesNo'),
('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'),
('opaccolorstylesheet','','','Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server\'s css directory) or a complete URL beginning with http (if the file lives on a remote server).','free'),
+('OpacCustomSearch','','70|10','Replace the search box on the OPAC with the provided HTML','Textarea'),
('opaccredits','','70|10','Define HTML Credits at the bottom of the OPAC page','Textarea'),
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
;
+INSERT INTO systempreferences (variable,value) VALUES);
+[% USE Koha %]
<div id="wrap">
<div id="header-region">
<div class="navbar navbar-inverse navbar-static-top">
[% ELSE %]
<div class="mastheadsearch">
[% END %]
- <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="form-inline">
- <label for="masthead_search"> Search
- [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
- [% IF ( mylibraryfirst ) %]
- (in [% mylibraryfirst %] only)
+ [% IF Koha.Preference('OpacCustomSearch') == '' %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="form-inline">
+ <label for="masthead_search"> Search
+ [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
+ [% IF ( mylibraryfirst ) %]
+ (in [% mylibraryfirst %] only)
+ [% END %]
[% END %]
- [% END %]
- </label>
+ </label>
- <select name="idx" id="masthead_search">
- [% IF ( ms_kw ) %]
- <option selected="selected" value="">Library catalog</option>
- [% ELSE %]
- <option value="">Library catalog</option>
- [% END # /ms_kw %]
- [% IF ( ms_ti ) %]
- <option selected="selected" value="ti">Title</option>
- [% ELSE %]
- <option value="ti">Title</option>
- [% END # /ms_ti %]
- [% IF ( ms_au ) %]
- <option selected="selected" value="au">Author</option>
- [% ELSE %]
- <option value="au">Author</option>
- [% END # /ms_au%]
- [% IF ( ms_su ) %]
- <option selected="selected" value="su">Subject</option>
- [% ELSE %]
- <option value="su">Subject</option>
- [% END # /ms_su %]
- [% IF ( ms_nb ) %]
- <option selected="selected" value="nb">ISBN</option>
- [% ELSE %]
- <option value="nb">ISBN</option>
- [% END # /ms_nb%]
- [% IF ( ms_se ) %]
- <option selected="selected" value="se">Series</option>
- [% ELSE %]
- <option value="se">Series</option>
- [% END # /ms_se %]
- [% IF ( numbersphr ) %]
- [% IF ( ms_callnum ) %]
- <option selected="selected" value="callnum,phr">Call number</option>
+ <select name="idx" id="masthead_search">
+ [% IF ( ms_kw ) %]
+ <option selected="selected" value="">Library catalog</option>
[% ELSE %]
- <option value="callnum,phr">Call number</option>
- [% END #/ms_callnum %]
- [% ELSE %]
- [% IF ( ms_callnum ) %]
- <option selected="selected" value="callnum">Call number</option>
+ <option value="">Library catalog</option>
+ [% END # /ms_kw %]
+ [% IF ( ms_ti ) %]
+ <option selected="selected" value="ti">Title</option>
+ [% ELSE %]
+ <option value="ti">Title</option>
+ [% END # /ms_ti %]
+ [% IF ( ms_au ) %]
+ <option selected="selected" value="au">Author</option>
+ [% ELSE %]
+ <option value="au">Author</option>
+ [% END # /ms_au%]
+ [% IF ( ms_su ) %]
+ <option selected="selected" value="su">Subject</option>
+ [% ELSE %]
+ <option value="su">Subject</option>
+ [% END # /ms_su %]
+ [% IF ( ms_nb ) %]
+ <option selected="selected" value="nb">ISBN</option>
[% ELSE %]
- <option value="callnum">Call number</option>
- [% END # /ms_callnum %]
- [% END # /numbersphr %]
- </select>
+ <option value="nb">ISBN</option>
+ [% END # /ms_nb%]
+ [% IF ( ms_se ) %]
+ <option selected="selected" value="se">Series</option>
+ [% ELSE %]
+ <option value="se">Series</option>
+ [% END # /ms_se %]
+ [% IF ( numbersphr ) %]
+ [% IF ( ms_callnum ) %]
+ <option selected="selected" value="callnum,phr">Call number</option>
+ [% ELSE %]
+ <option value="callnum,phr">Call number</option>
+ [% END #/ms_callnum %]
+ [% ELSE %]
+ [% IF ( ms_callnum ) %]
+ <option selected="selected" value="callnum">Call number</option>
+ [% ELSE %]
+ <option value="callnum">Call number</option>
+ [% END # /ms_callnum %]
+ [% END # /numbersphr %]
+ </select>
- [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
- <div class="input-append nolibrarypulldown">
- [% END %]
- [% IF ( ms_value ) %]
- <input type="text" title="Type search term" class="transl1" name="q" value="[% ms_value |html %]" /><span id="translControl"></span>
- [% ELSE %]
- <input type="text" title="Type search term" class="transl1" name="q" /><span id="translControl"></span>
- [% END # /ms_value %]
+ [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
+ <div class="input-append nolibrarypulldown">
+ [% END %]
+ [% IF ( ms_value ) %]
+ <input type="text" title="Type search term" class="transl1" name="q" value="[% ms_value |html %]" /><span id="translControl"></span>
+ [% ELSE %]
+ <input type="text" title="Type search term" class="transl1" name="q" /><span id="translControl"></span>
+ [% END # /ms_value %]
- [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
- <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
- </div>
- [% END %]
+ [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
+ <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
+ </div>
+ [% END %]
- [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
- <div class="input-append">
- <select name="branch_group_limit" id="select_library">
- <option value="">All libraries</option>
- [% IF BranchCategoriesLoop %]<optgroup label="Libraries">[% END %]
- [% FOREACH BranchesLoo IN BranchesLoop %]
- [% IF ( BranchesLoo.selected ) %]<option selected="selected" value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>
- [% ELSE %]<option value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>[% END %]
- [% END %]
- [% IF BranchCategoriesLoop %]
- </optgroup>
- <optgroup label="Groups">
- [% FOREACH bc IN BranchCategoriesLoop %]
- [% IF ( bc.selected ) %]
- <option selected="selected" value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
- [% ELSE %]
- <option value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
- [% END # / bc.selected %]
+ [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
+ <div class="input-append">
+ <select name="branch_group_limit" id="select_library">
+ <option value="">All libraries</option>
+ [% IF BranchCategoriesLoop %]<optgroup label="Libraries">[% END %]
+ [% FOREACH BranchesLoo IN BranchesLoop %]
+ [% IF ( BranchesLoo.selected ) %]<option selected="selected" value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>
+ [% ELSE %]<option value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>[% END %]
[% END %]
- </optgroup>
- [% END # / BranchCategoriesLoop %]
- </select>
- <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
- </div>
- [% ELSE %]
- [% IF ( opac_limit_override ) %]
- [% IF ( opac_search_limit ) %]
- <input name="limit" value="[% opac_search_limit %]" type="hidden" />
- [% END %]
+ [% IF BranchCategoriesLoop %]
+ </optgroup>
+ <optgroup label="Groups">
+ [% FOREACH bc IN BranchCategoriesLoop %]
+ [% IF ( bc.selected ) %]
+ <option selected="selected" value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
+ [% ELSE %]
+ <option value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
+ [% END # / bc.selected %]
+ [% END %]
+ </optgroup>
+ [% END # / BranchCategoriesLoop %]
+ </select>
+ <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
+ </div>
[% ELSE %]
- [% IF ( mylibraryfirst ) %]
- <input name="limit" value="branch:[% mylibraryfirst %]" type="hidden" />
- [% END %]
- [% END # / opac_limit_override %]
- [% END # / OpacAddMastheadLibraryPulldown %]
+ [% IF ( opac_limit_override ) %]
+ [% IF ( opac_search_limit ) %]
+ <input name="limit" value="[% opac_search_limit %]" type="hidden" />
+ [% END %]
+ [% ELSE %]
+ [% IF ( mylibraryfirst ) %]
+ <input name="limit" value="branch:[% mylibraryfirst %]" type="hidden" />
+ [% END %]
+ [% END # / opac_limit_override %]
+ [% END # / OpacAddMastheadLibraryPulldown %]
- </form>
+ </form>
+ [% ELSE # / Koha.Preference('OpacCustomSearch') == '' %]
+ [% Koha.Preference('OpacCustomSearch') %]
+ [% END # / Koha.Preference('OpacCustomSearch') == '' %]
</div> <!-- / .mastheadsearch -->
[% END # / UNLESS advsearch %]