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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-61 lines)
Lines 1070-1136 Link Here
1070
        <xsl:text>.</xsl:text>
1070
        <xsl:text>.</xsl:text>
1071
    </xsl:template>
1071
    </xsl:template>
1072
1072
1073
    <xsl:template name="showRDAtag264">
1074
    <!-- Depending on how many tags you have, we will pick by preference
1075
         Publisher-latest or Publisher or 'Other'-latest or 'Other'
1076
         The preferred tag is saved in the fav variable and passed to a
1077
         helper named-template -->
1078
        <xsl:choose>
1079
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3 and @ind2=1]">
1080
            <!-- ind1==3 means latest change -->
1081
            <!-- ind2==1 means Publisher -->
1082
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3 and @ind2=1][1]"/>
1083
              <xsl:call-template name="showRDAtag264helper">
1084
                <xsl:with-param name="field" select="$fav"/>
1085
              </xsl:call-template>
1086
            </xsl:when>
1087
1088
            <xsl:when test="marc:datafield[@tag=264 and @ind2=1]">
1089
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind2=1][last()]"/>
1090
              <xsl:call-template name="showRDAtag264helper">
1091
                <xsl:with-param name="field" select="$fav"/>
1092
              </xsl:call-template>
1093
            </xsl:when>
1094
1095
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
1096
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3][1]"/>
1097
              <xsl:call-template name="showRDAtag264helper">
1098
                <xsl:with-param name="field" select="$fav"/>
1099
              </xsl:call-template>
1100
            </xsl:when>
1101
1102
            <xsl:otherwise>
1103
              <xsl:variable name="fav" select="marc:datafield[@tag=264][last()]"/>
1104
              <xsl:call-template name="showRDAtag264helper">
1105
                <xsl:with-param name="field" select="$fav"/>
1106
              </xsl:call-template>
1107
            </xsl:otherwise>
1108
        </xsl:choose>
1109
    </xsl:template>
1110
    <xsl:template name="showRDAtag264helper">
1111
        <xsl:param name="field"/>
1112
        <xsl:variable name="ind2" select="$field/@ind2"/>
1113
        <xsl:choose>
1114
            <xsl:when test="$ind2='0'">
1115
                <span class="label">Producer: </span>
1116
            </xsl:when>
1117
            <xsl:when test="$ind2='1'">
1118
                <span class="label">Publisher: </span>
1119
            </xsl:when>
1120
            <xsl:when test="$ind2='2'">
1121
                <span class="label">Distributor: </span>
1122
            </xsl:when>
1123
            <xsl:when test="$ind2='3'">
1124
                <span class="label">Manufacturer: </span>
1125
            </xsl:when>
1126
        </xsl:choose>
1127
        <xsl:value-of select="$field/marc:subfield[@code='a']"/>
1128
        <xsl:text> </xsl:text>
1129
        <xsl:value-of select="$field/marc:subfield[@code='b']"/>
1130
        <xsl:text> </xsl:text>
1131
        <xsl:value-of select="$field/marc:subfield[@code='c']"/>
1132
    </xsl:template>
1133
1134
    <xsl:template name="nameABCQ">
1073
    <xsl:template name="nameABCQ">
1135
            <xsl:call-template name="chopPunctuation">
1074
            <xsl:call-template name="chopPunctuation">
1136
                <xsl:with-param name="chopString">
1075
                <xsl:with-param name="chopString">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-2 / +14 lines)
Lines 902-908 Link Here
902
      </xsl:call-template>
902
      </xsl:call-template>
903
    </xsl:if>
903
    </xsl:if>
904
904
905
    <xsl:if test="marc:datafield[@tag=260]">
905
    <!-- Publisher info and RDA related info from tags 260, 264 -->
906
    <xsl:choose>
907
        <xsl:when test="marc:datafield[@tag=260]">
906
        <span class="results_summary publisher"><span class="label">Publisher: </span>
908
        <span class="results_summary publisher"><span class="label">Publisher: </span>
907
            <xsl:for-each select="marc:datafield[@tag=260]">
909
            <xsl:for-each select="marc:datafield[@tag=260]">
908
                <xsl:if test="marc:subfield[@code='a']">
910
                <xsl:if test="marc:subfield[@code='a']">
Lines 926-933 Link Here
926
                </xsl:call-template>
928
                </xsl:call-template>
927
                <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
929
                <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
928
            </xsl:for-each>
930
            </xsl:for-each>
931
            <xsl:if test="marc:datafield[@tag=264]">
932
                <xsl:text>; </xsl:text>
933
                <xsl:call-template name="showRDAtag264"/>
934
            </xsl:if>
929
        </span>
935
        </span>
930
    </xsl:if>
936
        </xsl:when>
937
        <xsl:when test="marc:datafield[@tag=264]">
938
            <span class="results_summary">
939
                <xsl:call-template name="showRDAtag264"/>
940
            </span>
941
        </xsl:when>
942
    </xsl:choose>
931
943
932
    <!-- Dissertation note -->
944
    <!-- Dissertation note -->
933
    <xsl:if test="marc:datafield[@tag=502]">
945
    <xsl:if test="marc:datafield[@tag=502]">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl (-1 / +62 lines)
Lines 188-194 Link Here
188
                </span>
188
                </span>
189
            </xsl:if>
189
            </xsl:if>
190
        </xsl:for-each>
190
        </xsl:for-each>
191
    </xsl:template>
192
193
    <xsl:template name="showRDAtag264">
194
    <!-- Function showRDAtag264 shows selected information from tag 264
195
         on the Publisher line (used by OPAC Detail and Results)
196
         Depending on how many tags you have, we will pick by preference
197
         Publisher-latest or Publisher or 'Other'-latest or 'Other'
198
         The preferred tag is saved in the fav variable and passed to a
199
         helper named-template -->
200
        <xsl:choose>
201
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3 and @ind2=1]">
202
            <!-- ind1==3 means latest change -->
203
            <!-- ind2==1 means Publisher -->
204
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3 and @ind2=1][1]"/>
205
              <xsl:call-template name="showRDAtag264helper">
206
                <xsl:with-param name="field" select="$fav"/>
207
              </xsl:call-template>
208
            </xsl:when>
209
210
            <xsl:when test="marc:datafield[@tag=264 and @ind2=1]">
211
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind2=1][last()]"/>
212
              <xsl:call-template name="showRDAtag264helper">
213
                <xsl:with-param name="field" select="$fav"/>
214
              </xsl:call-template>
215
            </xsl:when>
191
216
217
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
218
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3][1]"/>
219
              <xsl:call-template name="showRDAtag264helper">
220
                <xsl:with-param name="field" select="$fav"/>
221
              </xsl:call-template>
222
            </xsl:when>
223
224
            <xsl:otherwise>
225
              <xsl:variable name="fav" select="marc:datafield[@tag=264][last()]"/>
226
              <xsl:call-template name="showRDAtag264helper">
227
                <xsl:with-param name="field" select="$fav"/>
228
              </xsl:call-template>
229
            </xsl:otherwise>
230
        </xsl:choose>
231
    </xsl:template>
232
    <xsl:template name="showRDAtag264helper">
233
        <xsl:param name="field"/>
234
        <xsl:variable name="ind2" select="$field/@ind2"/>
235
        <xsl:choose>
236
            <xsl:when test="$ind2='0'">
237
                <span class="label">Producer: </span>
238
            </xsl:when>
239
            <xsl:when test="$ind2='1'">
240
                <span class="label">Publisher: </span>
241
            </xsl:when>
242
            <xsl:when test="$ind2='2'">
243
                <span class="label">Distributor: </span>
244
            </xsl:when>
245
            <xsl:when test="$ind2='3'">
246
                <span class="label">Manufacturer: </span>
247
            </xsl:when>
248
        </xsl:choose>
249
        <xsl:value-of select="$field/marc:subfield[@code='a']"/>
250
        <xsl:text> </xsl:text>
251
        <xsl:value-of select="$field/marc:subfield[@code='b']"/>
252
        <xsl:text> </xsl:text>
253
        <xsl:value-of select="$field/marc:subfield[@code='c']"/>
192
    </xsl:template>
254
    </xsl:template>
193
255
194
</xsl:stylesheet>
256
</xsl:stylesheet>
195
- 

Return to bug 12726