if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
$template->param('UNIMARC' => 1);
}
+if (C4::Context->preference("IntranetNumbersPreferPhrase")) {
+ $template->param('numbersphr' => 1);
+}
if($cgi->cookie("holdfor")){
my $holdfor_patron = GetMember('borrowernumber' => $cgi->cookie("holdfor"));
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
+INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number OPAC searches', 'YesNo');
+INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo');
SetVersion($DBversion);
}
+$DBversion = "3.11.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number OPAC searches', 'YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo')");
+ print "Upgrade to $DBversion done (Bug 9395: Problem with callnumber and standard number search in OPAC and Staff Client)\n";
+ SetVersion ($DBversion);
+}
=head1 FUNCTIONS
[% END %]
<option value="bc">Barcode</option>
<option value="location">Shelving location</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>
+ [% IF (numbersphr) %]
+ <option value="callnum,phr"> Call number</option>
+ [% ELSE %]
<option value="callnum"> Call number</option>
+ [% END %]
<option value="ln,rtrn">Language</option>
<option value="nt">Notes/Comments</option>
[% IF (marcflavour != 'UNIMARC' ) %]
yes: show
no: "don't show"
- '"More options" on the OPAC and staff advanced search pages.'
+ -
+ - By default,
+ - pref: OPACNumbersPreferPhrase
+ type: boolean
+ choices:
+ yes: use
+ no: "don't use"
+ - 'the operator "phr" in the callnumber and standard number OPAC searches'
+ -
+ - By default,
+ - pref: IntranetNumbersPreferPhrase
+ type: boolean
+ choices:
+ yes: use
+ no: "don't use"
+ - 'the operator "phr" in the callnumber and standard number staff client searches'
Results Display:
-
- By default, sort search results in the staff client by
[% ELSE %]
<option value="se">Series</option>
[% END %]
- [% IF ( ms_callnum ) %]
+ [% IF ( numbersphr ) %]
+ [% IF ( ms_callnum ) %]
+ <option selected="selected" value="callnum,phr">Call number</option>
+ [% ELSE %]
+ <option value="callnum,phr">Call number</option>
+ [% END %]
+ [% ELSE %]
+ [% IF ( ms_callnum ) %]
<option selected="selected" value="callnum">Call number</option>
- [% ELSE %]
+ [% ELSE %]
<option value="callnum">Call number</option>
- [% END %]</select>
+ [% END %]
+ [% END %]</select>
[% IF ( ms_value ) %]
<input type="text" title="Type search term" id = "transl1" name="q" value="[% ms_value |html %]" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
[% ELSE %]
[% IF ( expanded_options ) %]
<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>
<option value="pb,wrdl">Publisher</option>
<option value="pl,wrdl">Publisher location</option>
[% IF ( expanded_options ) %]
+ [% IF ( numbersphr) %]
+ <option value="sn,phr">Standard number</option>
+ [% ELSE %]
+ <option value="sn">Standard number</option>
+ [% END %]
<option value="sn">Standard number</option>
<option value="nb"> ISBN</option>
<option value="ns"> ISSN</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 %]
$template->param('GoogleIndicTransliteration' => 1);
}
+if (C4::Context->preference('OPACNumbersPreferPhrase')) {
+ $template->param('numbersphr' => 1);
+}
+
output_html_with_http_headers $input, $cookie, $template->output;
$template->param( expanded_options => $cgi->param('expanded_options'));
}
}
+
+ if (C4::Context->preference('OPACNumbersPreferPhrase')) {
+ $template->param('numbersphr' => 1);
+ }
+
output_html_with_http_headers $cgi, $cookie, $template->output;
exit;
}