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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-16 / +45 lines)
Lines 1-8 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
4
5
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
4
<!-- Edited: Bug 13381 [ENH] XSLT enhancements sponsored by bywater solutions 2014/12/15 WS wsalesky@gmail.com  -->
6
<xsl:stylesheet version="1.0"
5
<xsl:stylesheet version="1.0"
7
  xmlns:marc="http://www.loc.gov/MARC21/slim"
6
  xmlns:marc="http://www.loc.gov/MARC21/slim"
8
  xmlns:items="http://www.koha-community.org/items"
7
  xmlns:items="http://www.koha-community.org/items"
Lines 106-117 Link Here
106
                    <xsl:call-template name="subfieldSelect">
105
                    <xsl:call-template name="subfieldSelect">
107
                        <xsl:with-param name="codes">a</xsl:with-param>
106
                        <xsl:with-param name="codes">a</xsl:with-param>
108
                    </xsl:call-template>
107
                    </xsl:call-template>
109
                    <xsl:if test="marc:subfield[@code='h']">
108
                <!--Bug 13381 Suppress subfield h from 245-->
110
                        <xsl:text> </xsl:text>
111
                        <xsl:call-template name="subfieldSelect">
112
                            <xsl:with-param name="codes">h</xsl:with-param>
113
                        </xsl:call-template>
114
                    </xsl:if>
115
                    <xsl:if test="marc:subfield[@code='b']">
109
                    <xsl:if test="marc:subfield[@code='b']">
116
                        <xsl:text> </xsl:text>
110
                        <xsl:text> </xsl:text>
117
                        <xsl:call-template name="subfieldSelect">
111
                        <xsl:call-template name="subfieldSelect">
Lines 119-127 Link Here
119
                        </xsl:call-template>
113
                        </xsl:call-template>
120
                    </xsl:if>
114
                    </xsl:if>
121
                    <xsl:text> </xsl:text>
115
                    <xsl:text> </xsl:text>
116
                <!--Bug 13381 add additional subfields-->
122
                    <xsl:call-template name="subfieldSelect">
117
                    <xsl:call-template name="subfieldSelect">
123
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
118
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
124
                    </xsl:call-template>
119
                    </xsl:call-template>
120
                <!--Bug 13381 If subfield h and subfield c add appropriate punctation-->
121
                <xsl:choose>
122
                    <xsl:when test="marc:subfield[@code='h'] and marc:subfield[@code='c']">
123
                        <xsl:variable name="length" select="string-length(marc:subfield[@code='h'])"/>
124
                        <xsl:if test="contains('/', substring(marc:subfield[@code='h'],$length,1))">
125
                            <xsl:text> / </xsl:text>
126
                        </xsl:if>
127
                    </xsl:when>
128
                    <!--if perviouse subfield end ends with puncutation add space -->
129
                    <xsl:when test="marc:subfield[@code='c']/preceding-sibling::*">
130
                        <xsl:variable name="length" select="string-length(marc:subfield[@code='c']/preceding-sibling::*[l])"/>
131
                        <xsl:if test="contains('.:,;/', substring(marc:subfield[@code='c']/preceding-sibling::*[1],$length,1))">
132
                            <xsl:text> </xsl:text>
133
                        </xsl:if>
134
                    </xsl:when>
135
                </xsl:choose>
136
                <!--Bug 13381 Added Statement of responsibility subfield display. Added at end of title -->
137
                <xsl:call-template name="subfieldSelect">
138
                    <xsl:with-param name="codes">c</xsl:with-param>
139
                </xsl:call-template>
140
                
125
            </xsl:for-each>
141
            </xsl:for-each>
126
        </h1>
142
        </h1>
127
        </xsl:if>
143
        </xsl:if>
Lines 143-156 Link Here
143
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
159
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
144
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
160
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
145
161
146
    <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
162
        <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
147
        <span class="results_summary type"><span class="label">Material type: </span>
163
            <span class="results_summary type"><span class="label">Material type: </span>
148
        <xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
164
            <xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
149
        <xsl:text> </xsl:text>
165
            <xsl:text> </xsl:text>
150
        <xsl:value-of select="$materialTypeLabel"/>
166
            <xsl:value-of select="$materialTypeLabel"/>
151
        </span>
167
            </span>
152
    </xsl:if>
168
        </xsl:if>
153
169
        
170
        <!--Bug 13381 Resource Medium from 245 strips [] and / from string-->
171
        <xsl:if test="marc:datafield[@tag=245][marc:subfield[@code='h']]">
172
            <span class="results_summary type"><span class="label">Medium: </span>
173
               <xsl:variable name="str">
174
                   <xsl:for-each select="marc:datafield[@tag=245]">
175
                       <xsl:call-template name="subfieldSelect">
176
                           <xsl:with-param name="codes">h</xsl:with-param>
177
                       </xsl:call-template>
178
                   </xsl:for-each>                   
179
               </xsl:variable>
180
                <xsl:value-of select="translate($str,'[]/',' ')"/>
181
            </span>
182
        </xsl:if>    
154
183
155
        <!--Series: Alternate Graphic Representation (MARC 880) -->
184
        <!--Series: Alternate Graphic Representation (MARC 880) -->
156
        <xsl:if test="$display880">
185
        <xsl:if test="$display880">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-20 / +50 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
2
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3
<!-- Edited: Bug 13381 [ENH] XSLT enhancements sponsored by bywater solutions 2014/12/15 WS wsalesky@gmail.com  -->
3
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
4
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
4
<xsl:stylesheet version="1.0"
5
<xsl:stylesheet version="1.0"
5
  xmlns:marc="http://www.loc.gov/MARC21/slim"
6
  xmlns:marc="http://www.loc.gov/MARC21/slim"
Lines 127-148 Link Here
127
                    <xsl:call-template name="subfieldSelect">
128
                    <xsl:call-template name="subfieldSelect">
128
                        <xsl:with-param name="codes">a</xsl:with-param>
129
                        <xsl:with-param name="codes">a</xsl:with-param>
129
                    </xsl:call-template>
130
                    </xsl:call-template>
130
                    <xsl:if test="marc:subfield[@code='h']">
131
                <!--Bug 13381 Suppress subfield h from 245-->
131
                        <xsl:text> </xsl:text>
132
                        <xsl:call-template name="subfieldSelect">
133
                            <xsl:with-param name="codes">h</xsl:with-param>
134
                        </xsl:call-template>
135
                    </xsl:if>
136
                    <xsl:if test="marc:subfield[@code='b']">
132
                    <xsl:if test="marc:subfield[@code='b']">
137
                        <xsl:text> </xsl:text>
133
                        <xsl:text> </xsl:text>
138
                        <xsl:call-template name="subfieldSelect">
134
                        <xsl:call-template name="subfieldSelect">
139
                            <xsl:with-param name="codes">b</xsl:with-param>
135
                            <xsl:with-param name="codes">b</xsl:with-param>
140
                        </xsl:call-template>
136
                        </xsl:call-template>
141
                    </xsl:if>
137
                    </xsl:if>
142
                <xsl:text> </xsl:text>
138
                   <xsl:text> </xsl:text>
143
                    <xsl:call-template name="subfieldSelect">
139
                <!--Bug 13381 add additional subfields-->
144
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
140
                <xsl:call-template name="subfieldSelect">
145
                    </xsl:call-template>
141
                    <xsl:with-param name="codes">fgknps</xsl:with-param>
142
                </xsl:call-template>
143
                <!--Bug 13381 If subfield h and subfield c add appropriate punctation-->
144
                <xsl:choose>
145
                    <xsl:when test="marc:subfield[@code='h'] and marc:subfield[@code='c']">
146
                        <xsl:variable name="length" select="string-length(marc:subfield[@code='h'])"/>
147
                        <xsl:if test="contains('/', substring(marc:subfield[@code='h'],$length,1))">
148
                            <xsl:text> / </xsl:text>
149
                        </xsl:if>
150
                    </xsl:when>
151
                    <!--if perviouse subfield end ends with puncutation add space -->
152
                    <xsl:when test="marc:subfield[@code='c']/preceding-sibling::*">
153
                        <xsl:variable name="length" select="string-length(marc:subfield[@code='c']/preceding-sibling::*[l])"/>
154
                        <xsl:if test="contains('.:,;/', substring(marc:subfield[@code='c']/preceding-sibling::*[1],$length,1))">
155
                            <xsl:text> </xsl:text>
156
                        </xsl:if>
157
                    </xsl:when>
158
                </xsl:choose>
159
                <!--Bug 13381 Added Statement of responsibility subfield display. Added at end of title -->
160
                <xsl:call-template name="subfieldSelect">
161
                    <xsl:with-param name="codes">c</xsl:with-param>
162
                </xsl:call-template>
146
            </xsl:for-each>
163
            </xsl:for-each>
147
        </h1>
164
        </h1>
148
        </xsl:if>
165
        </xsl:if>
Lines 170-185 Link Here
170
                </h5>
187
                </h5>
171
            </xsl:when>
188
            </xsl:when>
172
        </xsl:choose>
189
        </xsl:choose>
173
190
    
174
   <xsl:if test="$DisplayOPACiconsXSLT!='0'">
191
        <xsl:if test="$DisplayOPACiconsXSLT!='0'">
175
        <xsl:if test="$materialTypeCode!=''">
192
             <xsl:if test="$materialTypeCode!=''">
176
        <span class="results_summary type"><span class="label">Material type: </span>
193
             <span class="results_summary type"><span class="label">Material type: </span>
177
        <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element>
194
             <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element>
178
        <xsl:value-of select="$materialTypeLabel"/>
195
             <xsl:value-of select="$materialTypeLabel"/>
179
        </span>
196
             </span>
197
             </xsl:if>
180
        </xsl:if>
198
        </xsl:if>
181
   </xsl:if>
199
        
182
200
        <!--Bug 13381 Resource Medium from 245 strips [] and / from string-->
201
        <xsl:if test="marc:datafield[@tag=245][marc:subfield[@code='h']]">
202
            <span class="results_summary type"><span class="label">Medium: </span>
203
                <xsl:variable name="str">
204
                    <xsl:for-each select="marc:datafield[@tag=245]">
205
                        <xsl:call-template name="subfieldSelect">
206
                            <xsl:with-param name="codes">h</xsl:with-param>
207
                        </xsl:call-template>
208
                    </xsl:for-each>                   
209
                </xsl:variable>
210
                <xsl:value-of select="translate($str,'[]/',' ')"/>
211
            </span>
212
        </xsl:if>  
213
            
183
        <!--Series: Alternate Graphic Representation (MARC 880) -->
214
        <!--Series: Alternate Graphic Representation (MARC 880) -->
184
        <xsl:if test="$display880">
215
        <xsl:if test="$display880">
185
            <xsl:call-template name="m880Select">
216
            <xsl:call-template name="m880Select">
186
- 

Return to bug 13381