View | Details | Raw Unified | Return to bug 5738
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 Display856uAsImage OPACDisplay856uAsImage/ ) {
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/en/mandatory/sysprefs.sql (+2 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('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice');
293
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 (+7 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 = 'XXX';
4055
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4056
    $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')");
4057
    $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')");
4058
    print "Upgrade to $DBversion done (Add 'Display856uAsImage' and 'OPACDisplay856uAsImage' syspref)\n";
4059
    SetVersion ($DBversion);
4060
}
4054
=head1 FUNCTIONS
4061
=head1 FUNCTIONS
4055
4062
4056
=head2 DropAllForeignKeys($table)
4063
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+9 lines)
Lines 158-163 OPAC: Link Here
158
            - pref: OPACNoResultsFound
158
            - pref: OPACNoResultsFound
159
              type: textarea
159
              type: textarea
160
              class: code
160
              class: code
161
        -
162
            - 'Display the URI in the 856u field as an image on: '
163
            - pref: OPACDisplay856uAsImage
164
              choices:
165
                  OFF: "Neither Details or Results pages"
166
                  Details: "Details page only"
167
                  Results: "Results page only"
168
                  Both: "Both Details and Results pages"
169
            - 'Note: The corresponding OPACXSLT option must be turned on.'
161
    Features:
170
    Features:
162
        -
171
        -
163
            - pref: opacuserlogin
172
            - pref: opacuserlogin
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref (+9 lines)
Lines 63-68 Staff Client: Link Here
63
              choices:
63
              choices:
64
                  local: "included with Koha (faster, will work if internet goes down)."
64
                  local: "included with Koha (faster, will work if internet goes down)."
65
                  "http://yui.yahooapis.com/2.5.1/build": "from Yahoo's own servers (less demand on your servers)."
65
                  "http://yui.yahooapis.com/2.5.1/build": "from Yahoo's own servers (less demand on your servers)."
66
        -
67
            - 'Display the URI in the 856u field as an image on: '
68
            - pref: Display856uAsImage
69
              choices:
70
                  OFF: "Neither Details or Results pages"
71
                  Details: "Details page only"
72
                  Results: "Results page (for future use, Results XSLT not functional at this time)."
73
                  Both: "Both Results and Details pages (for future use, Results XSLT not functional at this time)."
74
            - 'Note: The corresponding XSLT option must be turned on.'
66
    Options:
75
    Options:
67
        -
76
        -
68
            - pref: viewMARC
77
            - pref: viewMARC
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-1 / +5 lines)
Lines 19-25 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
22
        <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
23
        <xsl:variable name="leader" select="marc:leader"/>
23
        <xsl:variable name="leader" select="marc:leader"/>
24
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
24
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
25
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
25
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
Lines 445-452 Link Here
445
        <xsl:if test="marc:datafield[@tag=856]">
445
        <xsl:if test="marc:datafield[@tag=856]">
446
        <span class="results_summary"><span class="label">Online Resources: </span>
446
        <span class="results_summary"><span class="label">Online Resources: </span>
447
        <xsl:for-each select="marc:datafield[@tag=856]">
447
        <xsl:for-each select="marc:datafield[@tag=856]">
448
                                   <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
448
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
449
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
449
                                    <xsl:choose>
450
                                    <xsl:choose>
451
                                    <xsl:when test="($Show856uAsImage='Details' 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')">
452
                                        <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>
453
                                    </xsl:when>
450
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
454
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
451
                                        <xsl:call-template name="subfieldSelect">
455
                                        <xsl:call-template name="subfieldSelect">
452
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
456
                                        <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 ($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 (+10 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="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
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 505-516 Link Here
505
            </span>
506
            </span>
506
        </xsl:if>
507
        </xsl:if>
507
508
509
<!-- Image processing code added here, takes precedence over text links including y3z text   -->
508
        <xsl:if test="marc:datafield[@tag=856]">
510
        <xsl:if test="marc:datafield[@tag=856]">
509
        <span class="results_summary"><span class="label">Online Resources: </span>
511
        <span class="results_summary"><span class="label">Online Resources: </span>
510
        <xsl:for-each select="marc:datafield[@tag=856]">
512
        <xsl:for-each select="marc:datafield[@tag=856]">
513
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
511
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
514
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
512
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
515
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
513
                                    <xsl:choose>
516
                                    <xsl:choose>
517
                                    <xsl:when test="($Show856uAsImage='Details' 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')">
518
                                        <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>
519
                                    </xsl:when>                                    
514
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
520
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
515
                                        <xsl:call-template name="subfieldSelect">
521
                                        <xsl:call-template name="subfieldSelect">
516
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
522
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
Lines 532-537 Link Here
532
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
538
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
533
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
539
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
534
                                    <xsl:choose>
540
                                    <xsl:choose>
541
                                    <xsl:when test="($Show856uAsImage='Details' 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')">
542
                                        <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>
543
                                    </xsl:when>                                    
535
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
544
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
536
                                        <xsl:call-template name="subfieldSelect">
545
                                        <xsl:call-template name="subfieldSelect">
537
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
546
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
Lines 558-563 Link Here
558
        </xsl:for-each>
567
        </xsl:for-each>
559
        </span>
568
        </span>
560
        </xsl:if>
569
        </xsl:if>
570
561
        <xsl:if test="marc:datafield[@tag=505]">
571
        <xsl:if test="marc:datafield[@tag=505]">
562
        <xsl:for-each select="marc:datafield[@tag=505]">
572
        <xsl:for-each select="marc:datafield[@tag=505]">
563
        <span class="results_summary">
573
        <span class="results_summary">
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl (+8 lines)
Lines 22-27 Link Here
22
    <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
22
    <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
23
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
23
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
24
    <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24
    <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
25
    <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
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 903-911 Link Here
903
         <span class="results_summary">
904
         <span class="results_summary">
904
			   <span class="label">Online Access: </span>
905
			   <span class="label">Online Access: </span>
905
                            <xsl:for-each select="marc:datafield[@tag=856]">
906
                            <xsl:for-each select="marc:datafield[@tag=856]">
907
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
906
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
908
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
907
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
909
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
908
                                    <xsl:choose>
910
                                    <xsl:choose>
911
                                     <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')">
912
                                        <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>
913
                                    </xsl:when>
909
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
914
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
910
                                        <xsl:call-template name="subfieldSelect">                        
915
                                        <xsl:call-template name="subfieldSelect">                        
911
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
916
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
Lines 927-932 Link Here
927
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
932
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
928
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
933
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
929
                                    <xsl:choose>
934
                                    <xsl:choose>
935
                                    <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')">
936
                                        <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>
937
                                    </xsl:when>
930
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
938
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
931
                                        <xsl:call-template name="subfieldSelect">                        
939
                                        <xsl:call-template name="subfieldSelect">                        
932
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
940
                                        <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 366-376 Link Here
366
    <span class="results_summary">
367
    <span class="results_summary">
367
      <span class="label">Online Resources: </span>
368
      <span class="label">Online Resources: </span>
368
      <xsl:for-each select="marc:datafield[@tag=856]">
369
      <xsl:for-each select="marc:datafield[@tag=856]">
370
        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
369
        <a>
371
        <a>
370
          <xsl:attribute name="href">
372
          <xsl:attribute name="href">
371
            <xsl:value-of select="marc:subfield[@code='u']"/>
373
            <xsl:value-of select="marc:subfield[@code='u']"/>
372
          </xsl:attribute>
374
          </xsl:attribute>
373
          <xsl:choose>
375
          <xsl:choose>
376
            <xsl:when test="($Show856uAsImage='Details' 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')">
377
              <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>
378
            </xsl:when>
374
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
379
            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
375
              <xsl:call-template name="subfieldSelect">
380
              <xsl:call-template name="subfieldSelect">
376
                <xsl:with-param name="codes">y3z</xsl:with-param>
381
                <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 74-79 Link Here
74
    <xsl:choose>
75
    <xsl:choose>
75
      <xsl:when test="marc:datafield[@tag=856]">
76
      <xsl:when test="marc:datafield[@tag=856]">
76
        <xsl:for-each select="marc:datafield[@tag=856]">
77
        <xsl:for-each select="marc:datafield[@tag=856]">
78
        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
77
          <xsl:choose>
79
          <xsl:choose>
78
            <xsl:when test="@ind2=0">
80
            <xsl:when test="@ind2=0">
79
              <a>
81
              <a>
Lines 81-86 Link Here
81
                  <xsl:value-of select="marc:subfield[@code='u']"/>
83
                  <xsl:value-of select="marc:subfield[@code='u']"/>
82
                </xsl:attribute>
84
                </xsl:attribute>
83
                <xsl:choose>
85
                <xsl:choose>
86
                  <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')">
87
                     <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>
88
                  </xsl:when>
84
                  <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
89
                  <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
85
                    <xsl:call-template name="subfieldSelect">                        
90
                    <xsl:call-template name="subfieldSelect">                        
86
                      <xsl:with-param name="codes">y3z</xsl:with-param>                    
91
                      <xsl:with-param name="codes">y3z</xsl:with-param>                    
87
- 

Return to bug 5738