View | Details | Raw Unified | Return to bug 5810
Collapse All | Expand All

(-)a/C4/Biblio.pm (-1 / +3 lines)
Lines 1390-1395 sub GetMarcSubjects { Link Here
1390
    my $subfield = "";
1390
    my $subfield = "";
1391
    my $marcsubject;
1391
    my $marcsubject;
1392
1392
1393
    my $subject_limit = C4::Context->preference("TraceCompleteSubfields") ? 'su,complete-subfield' : 'su';
1394
1393
    foreach my $field ( $record->field('6..') ) {
1395
    foreach my $field ( $record->field('6..') ) {
1394
        next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
1396
        next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
1395
        my @subfields_loop;
1397
        my @subfields_loop;
Lines 1416-1422 sub GetMarcSubjects { Link Here
1416
                @link_loop = ( { 'limit' => 'an', link => "$linkvalue" } );
1418
                @link_loop = ( { 'limit' => 'an', link => "$linkvalue" } );
1417
            }
1419
            }
1418
            if ( not $found9 ) {
1420
            if ( not $found9 ) {
1419
                push @link_loop, { 'limit' => 'su', link => $linkvalue, operator => $operator };
1421
                push @link_loop, { 'limit' => $subject_limit, link => $linkvalue, operator => $operator };
1420
            }
1422
            }
1421
            my $separator = C4::Context->preference("authoritysep") unless $counter == 0;
1423
            my $separator = C4::Context->preference("authoritysep") unless $counter == 0;
1422
1424
(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 128-134 sub XSLTParse4Display { Link Here
128
    my $itemsxml  = buildKohaItemsNamespace($biblionumber);
128
    my $itemsxml  = buildKohaItemsNamespace($biblionumber);
129
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
129
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
130
    my $sysxml = "<sysprefs>\n";
130
    my $sysxml = "<sysprefs>\n";
131
    foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL/ ) {
131
    foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL TraceCompleteSubfields UseAuthoritiesForTracings/ ) {
132
        my $sp = C4::Context->preference( $syspref );
132
        my $sp = C4::Context->preference( $syspref );
133
        next unless defined($sp);
133
        next unless defined($sp);
134
        $sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n";
134
        $sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n";
(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (+2 lines)
Lines 285-287 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
285
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
286
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');
286
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');
287
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');
287
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');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+2 lines)
Lines 285-287 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
285
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
286
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');
286
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');
287
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');
287
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');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (-1 / +3 lines)
Lines 286-289 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
287
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
287
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
288
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');
288
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');
289
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');
289
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');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/it-IT/necessari/sysprefs.sql (-1 / +3 lines)
Lines 271-274 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
271
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
271
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
272
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
272
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
273
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');
273
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');
274
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');
274
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');
275
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
276
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql (-1 / +3 lines)
Lines 283-286 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
283
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
283
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
284
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
284
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
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');
285
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');
286
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');
286
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');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 / +3 lines)
Lines 338-341 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
338
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
338
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
339
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
339
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
340
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');
340
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');
341
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');
341
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');
342
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
343
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 / +3 lines)
Lines 363-366 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
363
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
363
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
364
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
364
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
365
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');
365
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');
366
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');
366
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');
367
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo');
368
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UseAuthoritiesForTracings','1','Use authority record numbers for subject tracings instead of heading strings.','0','YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 4014-4019 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4014
    SetVersion ($DBversion);
4014
    SetVersion ($DBversion);
4015
}
4015
}
4016
4016
4017
$DBversion = '3.03.00.XXX';
4018
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4019
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TraceCompleteSubfields','0','Force subject tracings to only match complete subfields.','0','YesNo')");
4020
    $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')");
4021
    print "Upgrade to $DBversion done (Add syspref to force whole-subfield matching on subject tracings)\n";
4022
    SetVersion($DBversion);
4023
};
4024
4017
=head1 FUNCTIONS
4025
=head1 FUNCTIONS
4018
4026
4019
=head2 DropAllForeignKeys($table)
4027
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref (+7 lines)
Lines 14-16 Authorities: Link Here
14
              yes: "Don't"
14
              yes: "Don't"
15
              no: Do
15
              no: Do
16
        - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authorities.pl cronjob.
16
        - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authorities.pl cronjob.
17
    -
18
        - pref: UseAuthoritiesForTracings
19
          default: yes
20
          choices:
21
              yes: Use
22
              no: "Don't use"
23
        - authority record numbers instead of text strings for searches from subject tracings.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (+7 lines)
Lines 55-60 Searching: Link Here
55
                  yes: Use
55
                  yes: Use
56
                  no: "Don't use"
56
                  no: "Don't use"
57
            - PazPar2 to group similar results on the OPAC. This requires that PazPar2 is set up and running.
57
            - PazPar2 to group similar results on the OPAC. This requires that PazPar2 is set up and running.
58
        -
59
            - pref: TraceCompleteSubfields
60
              default: 0
61
              choices:
62
                  yes: Force
63
                  no: "Don't force"
64
            - subject tracings in the OPAC and Staff Client to search only for complete-subfield matches.
58
    Search Form:
65
    Search Form:
59
        -
66
        -
60
            - Show checkboxes to search by
67
            - Show checkboxes to search by
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-4 / +7 lines)
Lines 19-24 Link Here
19
        <xsl:variable name="UseControlNumber" select="1"/>
19
        <xsl:variable name="UseControlNumber" select="1"/>
20
        <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
20
        <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
21
        <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
21
        <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
22
        <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
23
        <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
22
24
23
        <xsl:variable name="leader" select="marc:leader"/>
25
        <xsl:variable name="leader" select="marc:leader"/>
24
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
26
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
Lines 121-128 Link Here
121
        </xsl:if>
123
        </xsl:if>
122
124
123
        <!-- Author Statement -->
125
        <!-- Author Statement -->
124
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/></xsl:call-template>
126
        <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>
125
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/></xsl:call-template>
127
        <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>
126
128
127
   <xsl:if test="$materialTypeCode!=''">
129
   <xsl:if test="$materialTypeCode!=''">
128
        <span class="results_summary"><span class="label">Type: </span>
130
        <span class="results_summary"><span class="label">Type: </span>
Lines 416-426 Link Here
416
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
418
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
417
            <a>
419
            <a>
418
            <xsl:choose>
420
            <xsl:choose>
419
            <xsl:when test="marc:subfield[@code=9]">
421
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
420
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
422
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
421
            </xsl:when>
423
            </xsl:when>
422
            <xsl:otherwise>
424
            <xsl:otherwise>
423
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
425
                <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>
424
            </xsl:otherwise>
426
            </xsl:otherwise>
425
            </xsl:choose>
427
            </xsl:choose>
426
            <xsl:call-template name="chopPunctuation">
428
            <xsl:call-template name="chopPunctuation">
Lines 791-796 Link Here
791
793
792
    <xsl:template name="showAuthor">
794
    <xsl:template name="showAuthor">
793
	<xsl:param name="authorfield"/>
795
	<xsl:param name="authorfield"/>
796
    <xsl:param name="UseAuthoritiesForTracings"/>
794
	<xsl:if test="count($authorfield)&gt;0">
797
	<xsl:if test="count($authorfield)&gt;0">
795
        <h5 class="author">
798
        <h5 class="author">
796
        <xsl:for-each select="$authorfield">
799
        <xsl:for-each select="$authorfield">
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-6 / +8 lines)
Lines 22-27 Link Here
22
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
22
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
23
    <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
23
    <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24
    <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
24
    <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
25
    
26
    <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
27
    <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
25
        <xsl:variable name="leader" select="marc:leader"/>
28
        <xsl:variable name="leader" select="marc:leader"/>
26
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
29
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
27
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
30
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 128-134 Link Here
128
        <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
131
        <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
129
        <a>
132
        <a>
130
        <xsl:choose>
133
        <xsl:choose>
131
            <xsl:when test="marc:subfield[@code=9]">
134
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
132
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
135
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
133
            </xsl:when>
136
            </xsl:when>
134
            <xsl:otherwise>
137
            <xsl:otherwise>
Lines 143-149 Link Here
143
        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
146
        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
144
        <a>
147
        <a>
145
        <xsl:choose>
148
        <xsl:choose>
146
            <xsl:when test="marc:subfield[@code=9]">
149
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
147
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
150
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
148
            </xsl:when>
151
            </xsl:when>
149
            <xsl:otherwise>
152
            <xsl:otherwise>
Lines 165-171 Link Here
165
            </xsl:choose>
168
            </xsl:choose>
166
        <a>
169
        <a>
167
        <xsl:choose>
170
        <xsl:choose>
168
            <xsl:when test="marc:subfield[@code=9]">
171
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
169
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
172
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
170
            </xsl:when>
173
            </xsl:when>
171
            <xsl:otherwise>
174
            <xsl:otherwise>
Lines 479-489 Link Here
479
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
482
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
480
            <a>
483
            <a>
481
            <xsl:choose>
484
            <xsl:choose>
482
            <xsl:when test="marc:subfield[@code=9]">
485
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
483
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
486
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
484
            </xsl:when>
487
            </xsl:when>
485
            <xsl:otherwise>
488
            <xsl:otherwise>
486
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
489
                <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>
487
            </xsl:otherwise>
490
            </xsl:otherwise>
488
            </xsl:choose>
491
            </xsl:choose>
489
            <xsl:call-template name="chopPunctuation">
492
            <xsl:call-template name="chopPunctuation">
490
- 

Return to bug 5810