@@ -, +, @@ - marcflavour = MARC21 - make sure you have a record with a "complex subject", like "Internet -- Law and legislation" opac-search.pl?q=su:"Internet" opac-search.pl?q=su:{Internet} opac-search.pl?q=su,complete-subfield:"Internet" opac-search.pl?q=su,complete-subfield:{Internet} opac-search.pl?q=(su:"Internet") and (su:"Law and legislation.") opac-search.pl?q=(su:{Internet}) and (su:{Law and legislation.}) opac-search.pl?q=(su,complete-subfield:"Internet") and (su,complete-subfield:"Law and legislation.") opac-search.pl?q=(su,complete-subfield:{Internet}) and (su,complete-subfield:{Law and legislation.}) --- C4/XSLT.pm | 2 +- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../en/modules/admin/preferences/searching.pref | 8 ++++++++ .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 18 +++++++++++++++--- 5 files changed, 32 insertions(+), 4 deletions(-) --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -131,7 +131,7 @@ sub XSLTParse4Display { my $sysxml = "\n"; foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD - OPACBaseURL TraceCompleteSubfields + OPACBaseURL TraceCompleteSubfields TracingQuotes UseAuthoritiesForTracings TraceSubjectSubdivisions Display856uAsImage OPACDisplay856uAsImage UseControlNumber --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -315,6 +315,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TracingQuotes', 'quote', 'Quote character to use when tracing subjects.','quote|curlybrace','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -4765,6 +4765,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.07.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TracingQuotes ','curlybrace','Quote character to use when tracing subjects.','quote|curlybrace','Choice')"); + print "Upgrade to $DBversion done (Add syspref to control the quoting characters used in subject tracings)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -69,6 +69,14 @@ Searching: yes: Include no: "Don't include" - subdivisions for searches generated by clicking on subject tracings. + - + - Use + - pref: TracingQuotes + default: quote + choices: + quote: quotes + curlybrace: curly braces + - 'to group subjects together. Set this to curly braces if you are using Zebra with ICU indexing.' Search Form: - - Show checkboxes to search by --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -27,6 +27,18 @@ + + + { + " + + + + + } + " + + @@ -474,13 +486,13 @@ /cgi-bin/koha/opac-search.pl?q= abcdfgklmnopqrstvxyz and - (su:{ - }) + (su: + ) - /cgi-bin/koha/opac-search.pl?q=su:{} + /cgi-bin/koha/opac-search.pl?q=su: --