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

(-)a/C4/XSLT.pm (-1 / +2 lines)
Lines 131-137 sub XSLTParse4Display { Link Here
131
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
131
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
132
                              DisplayOPACiconsXSLT URLLinkText viewISBD
132
                              DisplayOPACiconsXSLT URLLinkText viewISBD
133
                              OPACBaseURL TraceCompleteSubfields
133
                              OPACBaseURL TraceCompleteSubfields
134
                              UseAuthoritiesForTracings TraceSubjectSubdivisions / )
134
                              UseAuthoritiesForTracings TraceSubjectSubdivisions
135
                              Display856uAsImage OPACDisplay856uAsImage / )
135
    {
136
    {
136
        my $sp = C4::Context->preference( $syspref );
137
        my $sp = C4::Context->preference( $syspref );
137
        next unless defined($sp);
138
        next unless defined($sp);
(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (+2 lines)
Lines 298-300 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
298
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');
298
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');
299
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
299
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
300
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
300
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
301
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');
302
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/en/mandatory/sysprefs.sql (+2 lines)
Lines 298-300 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
298
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');
298
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');
299
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
299
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
300
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
300
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
301
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');
302
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/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (+2 lines)
Lines 300-302 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
300
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');
300
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');
301
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
301
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
302
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
302
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
303
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');
304
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/it-IT/necessari/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('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free');
285
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');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
288
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');
289
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/pl-PL/mandatory/sysprefs.sql (+2 lines)
Lines 297-299 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
297
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');
297
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');
298
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
298
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
299
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
299
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
300
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');
301
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/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (+2 lines)
Lines 352-354 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
352
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');
352
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');
353
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
353
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
354
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
354
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
355
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');
356
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/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (+2 lines)
Lines 377-379 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
377
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');
377
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');
378
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
378
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
379
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
379
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
380
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');
381
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 (+8 lines)
Lines 4166-4171 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4166
    SetVersion ($DBversion);
4166
    SetVersion ($DBversion);
4167
}
4167
}
4168
4168
4169
$DBversion = 'XXX';
4170
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4171
    $dbh->do("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')");
4172
    $dbh->do("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')");
4173
    print "Upgrade to $DBversion done (Add 'Display856uAsImage' and 'OPACDisplay856uAsImage' syspref)\n";
4174
    SetVersion ($DBversion);
4175
}
4176
4169
=head1 FUNCTIONS
4177
=head1 FUNCTIONS
4170
4178
4171
=head2 DropAllForeignKeys($table)
4179
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+9 lines)
Lines 163-168 OPAC: Link Here
163
            - pref: OPACNoResultsFound
163
            - pref: OPACNoResultsFound
164
              type: textarea
164
              type: textarea
165
              class: code
165
              class: code
166
        -
167
            - 'Display the URI in the 856u field as an image on: '
168
            - pref: OPACDisplay856uAsImage
169
              choices:
170
                  OFF: "Neither Details or Results pages"
171
                  Details: "Details page only"
172
                  Results: "Results page only"
173
                  Both: "Both Details and Results pages"
174
            - 'Note: The corresponding OPACXSLT option must be turned on.'
166
    Features:
175
    Features:
167
        -
176
        -
168
            - pref: opacuserlogin
177
            - pref: opacuserlogin
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref (+9 lines)
Lines 74-79 Staff Client: Link Here
74
                  yes: Show
74
                  yes: Show
75
                  no: "Don't show"
75
                  no: "Don't show"
76
            - images for <a href="/cgi-bin/koha/admin/authorised_values.pl">authorized values</a> (such as lost statuses and locations) in search results.
76
            - images for <a href="/cgi-bin/koha/admin/authorised_values.pl">authorized values</a> (such as lost statuses and locations) in search results.
77
        -
78
            - 'Display the URI in the 856u field as an image on: '
79
            - pref: Display856uAsImage
80
              choices:
81
                  OFF: "Neither Details or Results pages"
82
                  Details: "Details page only"
83
                  Results: "Results page (for future use, Results XSLT not functional at this time)."
84
                  Both: "Both Results and Details pages (for future use, Results XSLT not functional at this time)."
85
            - 'Note: The corresponding XSLT option must be turned on.'
77
    Options:
86
    Options:
78
        -
87
        -
79
            - pref: viewMARC
88
            - pref: viewMARC
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (+5 lines)
Lines 23-28 Link Here
23
        <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
23
        <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
24
        <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
24
        <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
25
25
26
        <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
26
        <xsl:variable name="leader" select="marc:leader"/>
27
        <xsl:variable name="leader" select="marc:leader"/>
27
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
28
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
28
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
29
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 457-464 Link Here
457
        <xsl:if test="marc:datafield[@tag=856]">
458
        <xsl:if test="marc:datafield[@tag=856]">
458
        <span class="results_summary"><span class="label">Online Resources: </span>
459
        <span class="results_summary"><span class="label">Online Resources: </span>
459
        <xsl:for-each select="marc:datafield[@tag=856]">
460
        <xsl:for-each select="marc:datafield[@tag=856]">
461
                                   <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
460
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
462
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
461
                                    <xsl:choose>
463
                                    <xsl:choose>
464
                                    <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
465
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
466
                                    </xsl:when>
462
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
467
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
463
                                        <xsl:call-template name="subfieldSelect">
468
                                        <xsl:call-template name="subfieldSelect">
464
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
469
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl (+5 lines)
Lines 15-20 Link Here
15
</xsl:template>
15
</xsl:template>
16
16
17
<xsl:template match="marc:record">
17
<xsl:template match="marc:record">
18
  <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
18
  <xsl:variable name="leader" select="marc:leader"/>
19
  <xsl:variable name="leader" select="marc:leader"/>
19
  <xsl:variable name="leader6" select="substring($leader,7,1)"/>
20
  <xsl:variable name="leader6" select="substring($leader,7,1)"/>
20
  <xsl:variable name="leader7" select="substring($leader,8,1)"/>
21
  <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 356-366 Link Here
356
    <li>
357
    <li>
357
      <strong>Online Resources: </strong>
358
      <strong>Online Resources: </strong>
358
      <xsl:for-each select="marc:datafield[@tag=856]">
359
      <xsl:for-each select="marc:datafield[@tag=856]">
360
        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
359
        <a>
361
        <a>
360
          <xsl:attribute name="href">
362
          <xsl:attribute name="href">
361
            <xsl:value-of select="marc:subfield[@code='u']"/>
363
            <xsl:value-of select="marc:subfield[@code='u']"/>
362
          </xsl:attribute>
364
          </xsl:attribute>
363
          <xsl:choose>
365
          <xsl:choose>
366
            <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
367
              <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
368
            </xsl:when>
364
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
369
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
365
              <xsl:call-template name="subfieldSelect">
370
              <xsl:call-template name="subfieldSelect">
366
                <xsl:with-param name="codes">y3z</xsl:with-param>
371
                <xsl:with-param name="codes">y3z</xsl:with-param>
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-9 / +11 lines)
Lines 26-31 Link Here
26
    <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
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']"/>
27
    <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
28
    <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28
    <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
29
    <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
29
        <xsl:variable name="leader" select="marc:leader"/>
30
        <xsl:variable name="leader" select="marc:leader"/>
30
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
31
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
31
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
32
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 511-539 Link Here
511
            </span>
512
            </span>
512
        </xsl:if>
513
        </xsl:if>
513
514
515
<!-- Image processing code added here, takes precedence over text links including y3z text   -->
514
        <xsl:if test="marc:datafield[@tag=856]">
516
        <xsl:if test="marc:datafield[@tag=856]">
515
        <span class="results_summary"><span class="label">Online Resources: </span>
517
        <span class="results_summary"><span class="label">Online Resources: </span>
516
        <xsl:for-each select="marc:datafield[@tag=856]">
518
        <xsl:for-each select="marc:datafield[@tag=856]">
519
            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
517
            <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
520
            <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
518
            <xsl:if test="$OPACURLOpenInNewWindow='1'">
521
            <xsl:if test="$OPACURLOpenInNewWindow='1'">
519
                <xsl:attribute name="target">_blank</xsl:attribute>
522
                <xsl:attribute name="target">_blank</xsl:attribute>
520
            </xsl:if>
523
            </xsl:if>
521
            <xsl:choose>
524
            <xsl:choose>
525
            <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
526
                <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
527
            </xsl:when>                                    
522
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
528
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
523
                <xsl:call-template name="subfieldSelect">
529
                <xsl:call-template name="subfieldSelect">
524
                    <xsl:with-param name="codes">y3z</xsl:with-param>
530
                    <xsl:with-param name="codes">y3z</xsl:with-param>
525
                </xsl:call-template>
531
                </xsl:call-template>
526
            </xsl:when>
532
            </xsl:when>
527
            <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
533
            <xsl:when test="$URLLinkText!=''">
528
                <xsl:choose>
534
                <xsl:value-of select="$URLLinkText"/>
529
                <xsl:when test="$URLLinkText!=''">
530
                    <xsl:value-of select="$URLLinkText"/>
531
                </xsl:when>
532
                <xsl:otherwise>
533
                    <xsl:text>Click here to access online</xsl:text>
534
                </xsl:otherwise>
535
                </xsl:choose>
536
            </xsl:when>
535
            </xsl:when>
536
            <xsl:otherwise>
537
                <xsl:text>Click here to access online</xsl:text>
538
            </xsl:otherwise>
537
            </xsl:choose>
539
            </xsl:choose>
538
            </a>
540
            </a>
539
            <xsl:choose>
541
            <xsl:choose>
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl (+8 lines)
Lines 23-28 Link Here
23
    <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
23
    <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
24
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
25
    <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
25
    <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
26
    <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
26
        <xsl:variable name="leader" select="marc:leader"/>
27
        <xsl:variable name="leader" select="marc:leader"/>
27
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
28
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
28
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
29
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 904-912 Link Here
904
         <span class="results_summary">
905
         <span class="results_summary">
905
			   <span class="label">Online Access: </span>
906
			   <span class="label">Online Access: </span>
906
                            <xsl:for-each select="marc:datafield[@tag=856]">
907
                            <xsl:for-each select="marc:datafield[@tag=856]">
908
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
907
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
909
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
908
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
910
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
909
                                    <xsl:choose>
911
                                    <xsl:choose>
912
                                     <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
913
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
914
                                    </xsl:when>
910
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
915
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
911
                                        <xsl:call-template name="subfieldSelect">                        
916
                                        <xsl:call-template name="subfieldSelect">                        
912
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
917
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
Lines 928-933 Link Here
928
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
933
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
929
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
934
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
930
                                    <xsl:choose>
935
                                    <xsl:choose>
936
                                    <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and ($SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
937
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
938
                                    </xsl:when>
931
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
939
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
932
                                        <xsl:call-template name="subfieldSelect">                        
940
                                        <xsl:call-template name="subfieldSelect">                        
933
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
941
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl (+5 lines)
Lines 15-20 Link Here
15
</xsl:template>
15
</xsl:template>
16
16
17
<xsl:template match="marc:record">
17
<xsl:template match="marc:record">
18
  <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
18
  <xsl:variable name="leader" select="marc:leader"/>
19
  <xsl:variable name="leader" select="marc:leader"/>
19
  <xsl:variable name="leader6" select="substring($leader,7,1)"/>
20
  <xsl:variable name="leader6" select="substring($leader,7,1)"/>
20
  <xsl:variable name="leader7" select="substring($leader,8,1)"/>
21
  <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 351-361 Link Here
351
    <span class="results_summary">
352
    <span class="results_summary">
352
      <span class="label">Online Resources: </span>
353
      <span class="label">Online Resources: </span>
353
      <xsl:for-each select="marc:datafield[@tag=856]">
354
      <xsl:for-each select="marc:datafield[@tag=856]">
355
        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
354
        <a>
356
        <a>
355
          <xsl:attribute name="href">
357
          <xsl:attribute name="href">
356
            <xsl:value-of select="marc:subfield[@code='u']"/>
358
            <xsl:value-of select="marc:subfield[@code='u']"/>
357
          </xsl:attribute>
359
          </xsl:attribute>
358
          <xsl:choose>
360
          <xsl:choose>
361
            <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
362
              <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
363
            </xsl:when>
359
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
364
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
360
              <xsl:call-template name="subfieldSelect">
365
              <xsl:call-template name="subfieldSelect">
361
                <xsl:with-param name="codes">y3z</xsl:with-param>
366
                <xsl:with-param name="codes">y3z</xsl:with-param>
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl (-1 / +5 lines)
Lines 18-23 Link Here
18
</xsl:template>
18
</xsl:template>
19
19
20
<xsl:template match="marc:record">
20
<xsl:template match="marc:record">
21
  <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
21
  <xsl:variable name="leader" select="marc:leader"/>
22
  <xsl:variable name="leader" select="marc:leader"/>
22
  <xsl:variable name="leader6" select="substring($leader,7,1)"/>
23
  <xsl:variable name="leader6" select="substring($leader,7,1)"/>
23
  <xsl:variable name="leader7" select="substring($leader,8,1)"/>
24
  <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 76-81 Link Here
76
    <xsl:choose>
77
    <xsl:choose>
77
      <xsl:when test="marc:datafield[@tag=856]">
78
      <xsl:when test="marc:datafield[@tag=856]">
78
        <xsl:for-each select="marc:datafield[@tag=856]">
79
        <xsl:for-each select="marc:datafield[@tag=856]">
80
        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
79
          <xsl:choose>
81
          <xsl:choose>
80
            <xsl:when test="@ind2=0">
82
            <xsl:when test="@ind2=0">
81
              <a>
83
              <a>
Lines 83-88 Link Here
83
                  <xsl:value-of select="marc:subfield[@code='u']"/>
85
                  <xsl:value-of select="marc:subfield[@code='u']"/>
84
                </xsl:attribute>
86
                </xsl:attribute>
85
                <xsl:choose>
87
                <xsl:choose>
88
                  <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
89
                     <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
90
                  </xsl:when>
86
                  <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
91
                  <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
87
                    <xsl:call-template name="subfieldSelect">                        
92
                    <xsl:call-template name="subfieldSelect">                        
88
                      <xsl:with-param name="codes">y3z</xsl:with-param>                    
93
                      <xsl:with-param name="codes">y3z</xsl:with-param>                    
89
- 

Return to bug 5738