Bugzilla – Attachment 3269 Details for
Bug 5810
Subject tracings should search complete subfields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed-off patch
bug_5810.patch (text/plain), 27.88 KB, created by
Jared Camins-Esakov
on 2011-03-08 17:13:24 UTC
(
hide
)
Description:
Signed-off patch
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2011-03-08 17:13:24 UTC
Size:
27.88 KB
patch
obsolete
> >Delivered-To: jcamins@cpbibliography.com >Received: by 10.100.227.14 with SMTP id z14cs122592ang; > Mon, 28 Feb 2011 11:20:15 -0800 (PST) >Received: by 10.223.113.73 with SMTP id z9mr1465530fap.41.1298920813767; > Mon, 28 Feb 2011 11:20:13 -0800 (PST) >Return-Path: <koha-patches-bounces@lists.koha-community.org> >Received: from eliot.biblibre.com (eliot.biblibre.com [188.165.204.78]) > by mx.google.com with ESMTPS id f22si4691358fak.41.2011.02.28.11.20.12 > (version=TLSv1/SSLv3 cipher=OTHER); > Mon, 28 Feb 2011 11:20:12 -0800 (PST) >Received-SPF: neutral (google.com: 188.165.204.78 is neither permitted nor denied by best guess record for domain of koha-patches-bounces@lists.koha-community.org) client-ip=188.165.204.78; >Authentication-Results: mx.google.com; spf=neutral (google.com: 188.165.204.78 is neither permitted nor denied by best guess record for domain of koha-patches-bounces@lists.koha-community.org) smtp.mail=koha-patches-bounces@lists.koha-community.org >Received: from eliot.biblibre.com (localhost.localdomain [127.0.0.1]) > by eliot.biblibre.com (Postfix) with ESMTP id 0A65F46E48; > Mon, 28 Feb 2011 20:20:12 +0100 (CET) >X-Original-To: koha-patches@lists.koha-community.org >Delivered-To: koha-patches_lists.koha-community.org@eliot.biblibre.com >Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com > [209.85.216.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) > (No client certificate requested) > by eliot.biblibre.com (Postfix) with ESMTPS id 5976746E43 > for <koha-patches@lists.koha-community.org>; > Mon, 28 Feb 2011 20:20:10 +0100 (CET) >Received: by qwh6 with SMTP id 6so4105820qwh.17 > for <koha-patches@lists.koha-community.org>; > Mon, 28 Feb 2011 11:20:08 -0800 (PST) >Received: by 10.52.158.226 with SMTP id wx2mr9830677vdb.128.1298920808403; > Mon, 28 Feb 2011 11:20:08 -0800 (PST) >Received: from localhost.localdomain > (pool-98-114-30-184.phlapa.fios.verizon.net [98.114.30.184]) > by mx.google.com with ESMTPS id cc8sm689609vdb.4.2011.02.28.11.20.07 > (version=TLSv1/SSLv3 cipher=OTHER); > Mon, 28 Feb 2011 11:20:07 -0800 (PST) >From: "Nicole C. Engard" <nengard@bywatersolutions.com> >To: koha-patches@lists.koha-community.org >Date: Sat, 26 Feb 2011 16:04:51 -0500 >Message-Id: <1298754291-6951-1-git-send-email-nengard@bywatersolutions.com> >X-Mailer: git-send-email 1.7.2.3 >Cc: Jared Camins-Esakov <jcamins@bywatersolutions.com> >Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5810: Subject tracings > search complete subfields >X-BeenThere: koha-patches@lists.koha-community.org >X-Mailman-Version: 2.1.11 >Precedence: list >List-Id: Patches submitted to Koha <koha-patches.lists.koha-community.org> >List-Unsubscribe: <http://lists.koha-community.org/cgi-bin/mailman/options/koha-patches>, > <mailto:koha-patches-request@lists.koha-community.org?subject=unsubscribe> >List-Archive: </pipermail/koha-patches> >List-Post: <mailto:koha-patches@lists.koha-community.org> >List-Help: <mailto:koha-patches-request@lists.koha-community.org?subject=help> >List-Subscribe: <http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches>, > <mailto:koha-patches-request@lists.koha-community.org?subject=subscribe> >MIME-Version: 1.0 >Content-Type: text/plain; charset="us-ascii" >Content-Transfer-Encoding: 7bit >Sender: koha-patches-bounces@lists.koha-community.org >Errors-To: koha-patches-bounces@lists.koha-community.org > >From: Jared Camins-Esakov <jcamins@bywatersolutions.com> > >This patch adds the syspref TraceCompleteSubfields. When TraceCompleteSubfields >is set to "force," clicking on links in non-authority controlled subject >tracings will only find other records where the entire subfields match. Leaving >it at "don't force" keeps the current behavior of doing a keyword search of the >subject indexes. > >This patch implements complete-subfield subject tracings in MARC21 XSLTs (OPAC >and Staff) and all Normal mode interfaces. UNIMARC XSLTs have not been updated. > >This patch also adds the syspref UseAuthoritiesForTracings. When set to "Do not" >tracings in the XSLT detail displays will never generate links using authority >numbers, but rather use the heading strings (NB: the tracings currently use only >subfield 'a' for generating links). > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Biblio.pm | 4 +++- > C4/XSLT.pm | 2 +- > installer/data/mysql/de-DE/mandatory/sysprefs.sql | 2 ++ > installer/data/mysql/en/mandatory/sysprefs.sql | 2 ++ > .../1-Obligatoire/unimarc_standard_systemprefs.sql | 4 +++- > installer/data/mysql/it-IT/necessari/sysprefs.sql | 4 +++- > installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 4 +++- > ...m_preferences_full_optimal_for_install_only.sql | 4 +++- > ...m_preferences_full_optimal_for_install_only.sql | 4 +++- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../en/modules/admin/preferences/authorities.pref | 7 +++++++ > .../en/modules/admin/preferences/searching.pref | 7 +++++++ > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 11 +++++++---- > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 13 ++++++++----- > 14 files changed, 60 insertions(+), 16 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 8ea5da5..7c60666 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -1390,6 +1390,8 @@ sub GetMarcSubjects { > my $subfield = ""; > my $marcsubject; > >+ my $subject_limit = C4::Context->preference("TraceCompleteSubfields") ? 'su,complete-subfield' : 'su'; >+ > foreach my $field ( $record->field('6..') ) { > next unless $field->tag() >= $mintag && $field->tag() <= $maxtag; > my @subfields_loop; >@@ -1416,7 +1418,7 @@ sub GetMarcSubjects { > @link_loop = ( { 'limit' => 'an', link => "$linkvalue" } ); > } > if ( not $found9 ) { >- push @link_loop, { 'limit' => 'su', link => $linkvalue, operator => $operator }; >+ push @link_loop, { 'limit' => $subject_limit, link => $linkvalue, operator => $operator }; > } > my $separator = C4::Context->preference("authoritysep") unless $counter == 0; > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index f1c5293..0c9e78b 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -128,7 +128,7 @@ sub XSLTParse4Display { > my $itemsxml = buildKohaItemsNamespace($biblionumber); > my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); > my $sysxml = "<sysprefs>\n"; >- foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL/ ) { >+ foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL TraceCompleteSubfields UseAuthoritiesForTracings/ ) { > my $sp = C4::Context->preference( $syspref ); > next unless defined($sp); > $sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n"; >diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql >index 02511d8..3e6ff53 100644 >--- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql >+++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql >@@ -285,3 +285,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql >index 0b75e98..f7c52c0 100644 >--- a/installer/data/mysql/en/mandatory/sysprefs.sql >+++ b/installer/data/mysql/en/mandatory/sysprefs.sql >@@ -285,3 +285,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql >index 757f255..f817d12 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql >@@ -286,4 +286,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); >-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >\ No newline at end of file >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql >index 79c469c..4a02e10 100644 >--- a/installer/data/mysql/it-IT/necessari/sysprefs.sql >+++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql >@@ -271,4 +271,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); >-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >\ No newline at end of file >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql >index 8689c4c..c298a46 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql >@@ -283,4 +283,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); >-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >\ No newline at end of file >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql >index c862e60..e87c078 100644 >--- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql >+++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql >@@ -338,4 +338,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); >-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >\ No newline at end of file >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql >index 82e285b..3f546d9 100644 >--- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql >+++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql >@@ -363,4 +363,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); >-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >\ No newline at end of file >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 31aa998..09aebb2 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4014,6 +4014,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = '3.03.00.XXX'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo')"); >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo')"); >+ print "Upgrade to $DBversion done (Add syspref to force whole-subfield matching on subject tracings)\n"; >+ SetVersion($DBversion); >+}; >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref >index f06d983..3d19af8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref >@@ -14,3 +14,10 @@ Authorities: > yes: "Don't" > no: Do > - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authorities.pl cronjob. >+ - >+ - pref: UseAuthoritiesForTracings >+ default: yes >+ choices: >+ yes: Use >+ no: "Don't use" >+ - authority record numbers instead of text strings for searches from subject tracings. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >index cd924dc..5ff267f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >@@ -55,6 +55,13 @@ Searching: > yes: Use > no: "Don't use" > - PazPar2 to group similar results on the OPAC. This requires that PazPar2 is set up and running. >+ - >+ - pref: TraceCompleteSubfields >+ default: 0 >+ choices: >+ yes: Force >+ no: "Don't force" >+ - subject tracings in the OPAC and Staff Client to search only for complete-subfield matches. > Search Form: > - > - Show checkboxes to search by >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index e3009d8..c96d82b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -19,6 +19,8 @@ > <xsl:variable name="UseControlNumber" select="1"/> > <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/> > <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/> >+ <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable> >+ <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/> > > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> >@@ -121,8 +123,8 @@ > </xsl:if> > > <!-- Author Statement --> >- <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/></xsl:call-template> >- <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/></xsl:call-template> >+ <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> >+ <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> > > <xsl:if test="$materialTypeCode!=''"> > <span class="results_summary"><span class="label">Type: </span> >@@ -416,11 +418,11 @@ > <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> > <a> > <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> > <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> > </xsl:otherwise> > </xsl:choose> > <xsl:call-template name="chopPunctuation"> >@@ -791,6 +793,7 @@ > > <xsl:template name="showAuthor"> > <xsl:param name="authorfield"/> >+ <xsl:param name="UseAuthoritiesForTracings"/> > <xsl:if test="count($authorfield)>0"> > <h5 class="author"> > <xsl:for-each select="$authorfield"> >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index 5703059..01e88f6 100755 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >@@ -22,6 +22,9 @@ > <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> > <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/> > <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/> >+ >+ <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable> >+ <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/> > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >@@ -128,7 +131,7 @@ > <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]"> > <a> > <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> > <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> >@@ -143,7 +146,7 @@ > <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]"> > <a> > <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> > <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> >@@ -165,7 +168,7 @@ > </xsl:choose> > <a> > <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> > <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> >@@ -479,11 +482,11 @@ > <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> > <a> > <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> > <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> > </xsl:otherwise> > </xsl:choose> > <xsl:call-template name="chopPunctuation"> >-- >1.7.2.3 > >_______________________________________________ >Koha-patches mailing list >Koha-patches@lists.koha-community.org >http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches >website : http://www.koha-community.org/ >git : http://git.koha-community.org/ >bugs : http://bugs.koha-community.org/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5810
:
3226
|
3269
|
3270
|
3271