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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (+58 lines)
Lines 982-987 Link Here
982
        </xsl:for-each>
982
        </xsl:for-each>
983
        </xsl:if>
983
        </xsl:if>
984
984
985
        <!-- OpenURL -->
986
        <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
987
        <xsl:variable name="OpenURLResolverURL" select="marc:sysprefs/marc:syspref[@name='OpenURLResolverURL']" />
988
        <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
989
        <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
990
        <xsl:variable name="COinS" select="marc:variables/marc:variable[@name='COinS']" />
991
992
        <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != '' and $COinS != ''">
993
          <xsl:variable name="openurltext">
994
            <xsl:choose>
995
              <xsl:when test="$OpenURLText != ''">
996
                <xsl:value-of select="$OpenURLText" />
997
              </xsl:when>
998
              <xsl:otherwise>
999
                <xsl:text>OpenURL</xsl:text>
1000
              </xsl:otherwise>
1001
            </xsl:choose>
1002
          </xsl:variable>
1003
          <xsl:variable name="openurlimagelocation">
1004
            <xsl:choose>
1005
              <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')">
1006
                <xsl:value-of select="$OpenURLImageLocation" />
1007
              </xsl:when>
1008
              <xsl:when test="$OpenURLImageLocation != ''">
1009
                <xsl:text>/opac-tmpl/prog/images/</xsl:text>
1010
                <xsl:value-of select="$OpenURLImageLocation" />
1011
              </xsl:when>
1012
            </xsl:choose>
1013
          </xsl:variable>
1014
1015
          <span class="results_summary"><a>
1016
            <xsl:attribute name="href">
1017
              <xsl:value-of select="$OpenURLResolverURL" />
1018
              <xsl:text>?</xsl:text>
1019
              <xsl:value-of select="$COinS" />
1020
            </xsl:attribute>
1021
            <xsl:attribute name="title">
1022
              <xsl:value-of select="$openurltext" />
1023
            </xsl:attribute>
1024
            <xsl:attribute name="class">
1025
              <xsl:text>OpenURL</xsl:text>
1026
            </xsl:attribute>
1027
            <xsl:choose>
1028
              <xsl:when test="$openurlimagelocation != ''">
1029
                <img>
1030
                  <xsl:attribute name="src">
1031
                    <xsl:value-of select="$openurlimagelocation" />
1032
                  </xsl:attribute>
1033
                </img>
1034
              </xsl:when>
1035
              <xsl:otherwise>
1036
                <xsl:value-of select="$openurltext" />
1037
              </xsl:otherwise>
1038
            </xsl:choose>
1039
          </a></span>
1040
        </xsl:if>
1041
        <!-- End of OpenURL -->
1042
985
    </xsl:element>
1043
    </xsl:element>
986
    </xsl:template>
1044
    </xsl:template>
987
1045
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-1 / +59 lines)
Lines 438-445 Link Here
438
        </xsl:for-each>
438
        </xsl:for-each>
439
        </xsl:if>
439
        </xsl:if>
440
    </a>
440
    </a>
441
    <p>
442
441
442
    <!-- OpenURL -->
443
    <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
444
    <xsl:variable name="OpenURLResolverURL" select="marc:sysprefs/marc:syspref[@name='OpenURLResolverURL']" />
445
    <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
446
    <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
447
    <xsl:variable name="COinS" select="marc:variables/marc:variable[@name='COinS']" />
448
449
    <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != '' and $COinS != ''">
450
      <xsl:variable name="openurltext">
451
        <xsl:choose>
452
          <xsl:when test="$OpenURLText != ''">
453
            <xsl:value-of select="$OpenURLText" />
454
          </xsl:when>
455
          <xsl:otherwise>
456
            <xsl:text>OpenURL</xsl:text>
457
          </xsl:otherwise>
458
        </xsl:choose>
459
      </xsl:variable>
460
      <xsl:variable name="openurlimagelocation">
461
        <xsl:choose>
462
          <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')">
463
            <xsl:value-of select="$OpenURLImageLocation" />
464
          </xsl:when>
465
          <xsl:when test="$OpenURLImageLocation != ''">
466
            <xsl:text>/opac-tmpl/prog/images/</xsl:text>
467
            <xsl:value-of select="$OpenURLImageLocation" />
468
          </xsl:when>
469
        </xsl:choose>
470
      </xsl:variable>
471
472
      <span class="results_summary"><a>
473
        <xsl:attribute name="href">
474
          <xsl:value-of select="$OpenURLResolverURL" />
475
          <xsl:text>?</xsl:text>
476
          <xsl:value-of select="$COinS" />
477
        </xsl:attribute>
478
        <xsl:attribute name="title">
479
          <xsl:value-of select="$openurltext" />
480
        </xsl:attribute>
481
        <xsl:attribute name="class">
482
          <xsl:text>OpenURL</xsl:text>
483
        </xsl:attribute>
484
        <xsl:choose>
485
          <xsl:when test="$openurlimagelocation != ''">
486
            <img>
487
              <xsl:attribute name="src">
488
                <xsl:value-of select="$openurlimagelocation" />
489
              </xsl:attribute>
490
            </img>
491
          </xsl:when>
492
          <xsl:otherwise>
493
            <xsl:value-of select="$openurltext" />
494
          </xsl:otherwise>
495
        </xsl:choose>
496
      </a></span>
497
    </xsl:if>
498
    <!-- End of OpenURL -->
499
500
    <p>
443
    <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
501
    <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
444
    <xsl:if test="$display880">
502
    <xsl:if test="$display880">
445
      <xsl:call-template name="m880Select">
503
      <xsl:call-template name="m880Select">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl (+59 lines)
Lines 438-443 Link Here
438
      </xsl:for-each>
438
      </xsl:for-each>
439
    </span>
439
    </span>
440
  </xsl:if>
440
  </xsl:if>
441
442
  <!-- OpenURL -->
443
  <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
444
  <xsl:variable name="OpenURLResolverURL" select="marc:sysprefs/marc:syspref[@name='OpenURLResolverURL']" />
445
  <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
446
  <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
447
  <xsl:variable name="COinS" select="marc:variables/marc:variable[@name='COinS']" />
448
449
  <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != '' and $COinS != ''">
450
    <xsl:variable name="openurltext">
451
      <xsl:choose>
452
        <xsl:when test="$OpenURLText != ''">
453
          <xsl:value-of select="$OpenURLText" />
454
        </xsl:when>
455
        <xsl:otherwise>
456
          <xsl:text>OpenURL</xsl:text>
457
        </xsl:otherwise>
458
      </xsl:choose>
459
    </xsl:variable>
460
    <xsl:variable name="openurlimagelocation">
461
      <xsl:choose>
462
        <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')">
463
          <xsl:value-of select="$OpenURLImageLocation" />
464
        </xsl:when>
465
        <xsl:when test="$OpenURLImageLocation != ''">
466
          <xsl:text>/opac-tmpl/prog/images/</xsl:text>
467
          <xsl:value-of select="$OpenURLImageLocation" />
468
        </xsl:when>
469
      </xsl:choose>
470
    </xsl:variable>
471
472
    <span class="results_summary"><a>
473
      <xsl:attribute name="href">
474
        <xsl:value-of select="$OpenURLResolverURL" />
475
        <xsl:text>?</xsl:text>
476
        <xsl:value-of select="$COinS" />
477
      </xsl:attribute>
478
      <xsl:attribute name="title">
479
        <xsl:value-of select="$openurltext" />
480
      </xsl:attribute>
481
      <xsl:attribute name="class">
482
        <xsl:text>OpenURL</xsl:text>
483
      </xsl:attribute>
484
      <xsl:choose>
485
        <xsl:when test="$openurlimagelocation != ''">
486
          <img>
487
            <xsl:attribute name="src">
488
              <xsl:value-of select="$openurlimagelocation" />
489
            </xsl:attribute>
490
          </img>
491
        </xsl:when>
492
        <xsl:otherwise>
493
          <xsl:value-of select="$openurltext" />
494
        </xsl:otherwise>
495
      </xsl:choose>
496
    </a></span>
497
  </xsl:if>
498
  <!-- End of OpenURL -->
499
441
</xsl:template>
500
</xsl:template>
442
501
443
    <xsl:template name="nameABCDQ">
502
    <xsl:template name="nameABCDQ">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl (-1 / +58 lines)
Lines 77-82 Link Here
77
    </xsl:for-each>
77
    </xsl:for-each>
78
  </xsl:if>
78
  </xsl:if>
79
79
80
  <!-- OpenURL -->
81
  <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
82
  <xsl:variable name="OpenURLResolverURL" select="marc:sysprefs/marc:syspref[@name='OpenURLResolverURL']" />
83
  <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
84
  <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
85
  <xsl:variable name="COinS" select="marc:variables/marc:variable[@name='COinS']" />
86
87
  <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != '' and $COinS != ''">
88
    <xsl:variable name="openurltext">
89
      <xsl:choose>
90
        <xsl:when test="$OpenURLText != ''">
91
          <xsl:value-of select="$OpenURLText" />
92
        </xsl:when>
93
        <xsl:otherwise>
94
          <xsl:text>OpenURL</xsl:text>
95
        </xsl:otherwise>
96
      </xsl:choose>
97
    </xsl:variable>
98
    <xsl:variable name="openurlimagelocation">
99
      <xsl:choose>
100
        <xsl:when test="starts-with($OpenURLImageLocation, 'http://') or starts-with($OpenURLImageLocation, 'https://')">
101
          <xsl:value-of select="$OpenURLImageLocation" />
102
        </xsl:when>
103
        <xsl:when test="$OpenURLImageLocation != ''">
104
          <xsl:text>/opac-tmpl/prog/images/</xsl:text>
105
          <xsl:value-of select="$OpenURLImageLocation" />
106
        </xsl:when>
107
      </xsl:choose>
108
    </xsl:variable>
109
110
    <span class="results_summary"><a>
111
      <xsl:attribute name="href">
112
        <xsl:value-of select="$OpenURLResolverURL" />
113
        <xsl:text>?</xsl:text>
114
        <xsl:value-of select="$COinS" />
115
      </xsl:attribute>
116
      <xsl:attribute name="title">
117
        <xsl:value-of select="$openurltext" />
118
      </xsl:attribute>
119
      <xsl:attribute name="class">
120
        <xsl:text>OpenURL</xsl:text>
121
      </xsl:attribute>
122
      <xsl:choose>
123
        <xsl:when test="$openurlimagelocation != ''">
124
          <img>
125
            <xsl:attribute name="src">
126
              <xsl:value-of select="$openurlimagelocation" />
127
            </xsl:attribute>
128
          </img>
129
        </xsl:when>
130
        <xsl:otherwise>
131
          <xsl:value-of select="$openurltext" />
132
        </xsl:otherwise>
133
      </xsl:choose>
134
    </a></span>
135
  </xsl:if>
136
  <!-- End of OpenURL -->
137
80
  <xsl:call-template name="tag_title">
138
  <xsl:call-template name="tag_title">
81
    <xsl:with-param name="tag">454</xsl:with-param>
139
    <xsl:with-param name="tag">454</xsl:with-param>
82
    <xsl:with-param name="label">Translation of</xsl:with-param>
140
    <xsl:with-param name="label">Translation of</xsl:with-param>
83
- 

Return to bug 8995