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

(-)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 CrossRefsUseAuthorities/ ) {
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/admin/systempreferences.pl (+1 lines)
Lines 249-254 $tabsysprefs{opaclanguagesdisplay} = "I18N/L10N"; Link Here
249
$tabsysprefs{language}      = "I18N/L10N";
249
$tabsysprefs{language}      = "I18N/L10N";
250
250
251
# Searching
251
# Searching
252
$tabsysprefs{CrossRefsUseAuthorities}        = "Searching";
252
$tabsysprefs{defaultSortField}        = "Searching";
253
$tabsysprefs{defaultSortField}        = "Searching";
253
$tabsysprefs{defaultSortOrder}        = "Searching";
254
$tabsysprefs{defaultSortOrder}        = "Searching";
254
$tabsysprefs{numSearchResults}        = "Searching";
255
$tabsysprefs{numSearchResults}        = "Searching";
(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (+1 lines)
Lines 288-291 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');
291
292
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+1 lines)
Lines 289-291 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','0','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','0','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
292
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (-1 / +1 lines)
Lines 290-293 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
292
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
292
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
293
293
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');
(-)a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql (-1 / +2 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 ('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 ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');
(-)a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (+1 lines)
Lines 342-344 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
342
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
342
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
343
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
343
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
344
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
344
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
345
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');
(-)a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (+1 lines)
Lines 367-369 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
367
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
367
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
368
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
368
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
369
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
369
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','','YesNo');
370
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 4051-4056 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4051
    SetVersion ($DBversion);
4051
    SetVersion ($DBversion);
4052
}
4052
}
4053
4053
4054
$DBversion = '3.03.00.023';
4055
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4056
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('CrossRefsUseAuthorities','1','If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.','','YesNo');");
4057
    print "Upgrade to $DBversion done (Add AuthoritiesLog syspref)\n";
4058
    SetVersion ($DBversion);
4059
}
4054
=head1 FUNCTIONS
4060
=head1 FUNCTIONS
4055
4061
4056
=head2 DropAllForeignKeys($table)
4062
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (+12 lines)
Lines 1-6 Link Here
1
Searching:
1
Searching:
2
    Features:
2
    Features:
3
        -
3
        -
4
            - pref: CrossRefsUseAuthorities
5
              choices:
6
                  yes: "Use"
7
                  no: Don't use
8
            - authority records for searches.  If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles.
9
        -
10
            - When Zebra is not in use, translate the following MARC fields to the following indexes (each line should look something like <code>'indexname' =&gt; '100a,245a,500*',</code>):
11
            - pref: NoZebraIndexes
12
              type: textarea
13
              class: list
14
            -
15
        -
4
            - pref: NoZebra
16
            - pref: NoZebra
5
              choices:
17
              choices:
6
                  yes: "Don't use"
18
                  yes: "Don't use"
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-4 / +5 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
    <xsl:variable name="CrossRefsUseAuthorities" select="marc:sysprefs/marc:syspref[@name='CrossRefsUseAuthorities']"/>
25
        <xsl:variable name="leader" select="marc:leader"/>
26
        <xsl:variable name="leader" select="marc:leader"/>
26
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
27
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
27
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
28
        <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]">
129
        <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
129
        <a>
130
        <a>
130
        <xsl:choose>
131
        <xsl:choose>
131
            <xsl:when test="marc:subfield[@code=9]">
132
            <xsl:when test="marc:subfield[@code=9] and $CrossRefsUseAuthorities!='0'">
132
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
133
                <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>
134
            </xsl:when>
134
            <xsl:otherwise>
135
            <xsl:otherwise>
Lines 143-149 Link Here
143
        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
144
        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
144
        <a>
145
        <a>
145
        <xsl:choose>
146
        <xsl:choose>
146
            <xsl:when test="marc:subfield[@code=9]">
147
            <xsl:when test="marc:subfield[@code=9] and $CrossRefsUseAuthorities!='0'">
147
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
148
                <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>
149
            </xsl:when>
149
            <xsl:otherwise>
150
            <xsl:otherwise>
Lines 165-171 Link Here
165
            </xsl:choose>
166
            </xsl:choose>
166
        <a>
167
        <a>
167
        <xsl:choose>
168
        <xsl:choose>
168
            <xsl:when test="marc:subfield[@code=9]">
169
            <xsl:when test="marc:subfield[@code=9] and $CrossRefsUseAuthorities!='0'">
169
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
170
                <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>
171
            </xsl:when>
171
            <xsl:otherwise>
172
            <xsl:otherwise>
Lines 479-485 Link Here
479
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
480
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
480
            <a>
481
            <a>
481
            <xsl:choose>
482
            <xsl:choose>
482
            <xsl:when test="marc:subfield[@code=9]">
483
            <xsl:when test="marc:subfield[@code=9] and $CrossRefsUseAuthorities!='0'">
483
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
484
                <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>
485
            </xsl:when>
485
            <xsl:otherwise>
486
            <xsl:otherwise>
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-2 / +1 lines)
Lines 127-133 Link Here
127
                                <xsl:value-of select="$str"/>
127
                                <xsl:value-of select="$str"/>
128
                            </a>
128
                            </a>
129
                        </xsl:when>
129
                        </xsl:when>
130
                       <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])">
130
                       <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9]) and $CrossRefsUseAuthorities!='0'">
131
                            <a>
131
                            <a>
132
                                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of  select="marc:subfield[@code=9]"/></xsl:attribute>
132
                                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of  select="marc:subfield[@code=9]"/></xsl:attribute>
133
                                  <xsl:value-of select="$str"/>
133
                                  <xsl:value-of select="$str"/>
134
- 

Return to bug 5842