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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-23 / +39 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/29 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 101-117 Link Here
101
        </xsl:if>
100
        </xsl:if>
102
101
103
        <xsl:if test="marc:datafield[@tag=245]">
102
        <xsl:if test="marc:datafield[@tag=245]">
104
        <h1>
103
            <h1 class="title" property="name">
105
            <xsl:for-each select="marc:datafield[@tag=245]">
104
                <xsl:for-each select="marc:datafield[@tag=245]">
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']">
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']">
108
                    <xsl:if test="marc:subfield[@code='b']">
116
                        <xsl:text> </xsl:text>
109
                        <xsl:text> </xsl:text>
117
                        <xsl:call-template name="subfieldSelect">
110
                        <xsl:call-template name="subfieldSelect">
Lines 119-129 Link Here
119
                        </xsl:call-template>
112
                        </xsl:call-template>
120
                    </xsl:if>
113
                    </xsl:if>
121
                    <xsl:text> </xsl:text>
114
                    <xsl:text> </xsl:text>
122
                    <xsl:call-template name="subfieldSelect">
115
                    <!--Bug 13381 add additional subfields-->
123
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
116
                    <xsl:for-each select="marc:subfield[contains('fghknps', @code)]">
124
                    </xsl:call-template>
117
                        <xsl:choose>
125
            </xsl:for-each>
118
                            <xsl:when test="@code='h'">
126
        </h1>
119
                                <!-- Span class around subfield h so it can be suppressed via css -->
120
                                <span class="title-medium"><xsl:apply-templates/> </span>                            
121
                            </xsl:when>
122
                            <xsl:otherwise>
123
                                <xsl:apply-templates/>
124
                                <xsl:text> </xsl:text>
125
                            </xsl:otherwise>
126
                        </xsl:choose>
127
                    </xsl:for-each>
128
                </xsl:for-each>
129
            </h1>
127
        </xsl:if>
130
        </xsl:if>
128
131
129
        <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
132
        <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
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>
146
        <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>
147
        <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
148
146
    <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
149
        <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
147
        <span class="results_summary type"><span class="label">Material type: </span>
150
            <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>
151
            <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>
152
            <xsl:text> </xsl:text>
150
        <xsl:value-of select="$materialTypeLabel"/>
153
            <xsl:value-of select="$materialTypeLabel"/>
151
        </span>
154
            </span>
152
    </xsl:if>
155
        </xsl:if>
153
156
        
157
        <!--Bug 13381 Resource Medium from 245 strips [] and / from string-->
158
        <xsl:if test="marc:datafield[@tag=245][marc:subfield[@code='h']]">
159
            <span class="results_summary type"><span class="label">Medium: </span>
160
               <xsl:variable name="str">
161
                   <xsl:for-each select="marc:datafield[@tag=245]">
162
                       <xsl:call-template name="subfieldSelect">
163
                           <xsl:with-param name="codes">h</xsl:with-param>
164
                       </xsl:call-template>
165
                   </xsl:for-each>                   
166
               </xsl:variable>
167
                <xsl:value-of select="translate($str,'[]/',' ')"/>
168
            </span>
169
        </xsl:if>    
154
170
155
        <!--Series: Alternate Graphic Representation (MARC 880) -->
171
        <!--Series: Alternate Graphic Representation (MARC 880) -->
156
        <xsl:if test="$display880">
172
        <xsl:if test="$display880">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-20 / +38 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/29 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
                        <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']">
131
                    <xsl:if test="marc:subfield[@code='b']">
137
                        <xsl:text> </xsl:text>
132
                        <xsl:text> </xsl:text>
138
                        <xsl:call-template name="subfieldSelect">
133
                        <xsl:call-template name="subfieldSelect">
139
                            <xsl:with-param name="codes">b</xsl:with-param>
134
                            <xsl:with-param name="codes">b</xsl:with-param>
140
                        </xsl:call-template>
135
                        </xsl:call-template>
141
                    </xsl:if>
136
                    </xsl:if>
142
                <xsl:text> </xsl:text>
137
                   <xsl:text> </xsl:text>
143
                    <xsl:call-template name="subfieldSelect">
138
                <!--Bug 13381 add additional subfields-->
144
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
139
                <xsl:for-each select="marc:subfield[contains('fghknps', @code)]">
145
                    </xsl:call-template>
140
                    <xsl:choose>
141
                        <xsl:when test="@code='h'">
142
                            <!-- Span class around subfield h so it can be suppressed via css -->
143
                            <span class="title-medium"><xsl:apply-templates/> </span>                            
144
                        </xsl:when>
145
                        <xsl:otherwise>
146
                            <xsl:apply-templates/>
147
                            <xsl:text> </xsl:text>
148
                        </xsl:otherwise>
149
                    </xsl:choose>
150
                </xsl:for-each>
146
            </xsl:for-each>
151
            </xsl:for-each>
147
        </h1>
152
        </h1>
148
        </xsl:if>
153
        </xsl:if>
Lines 170-185 Link Here
170
                </h5>
175
                </h5>
171
            </xsl:when>
176
            </xsl:when>
172
        </xsl:choose>
177
        </xsl:choose>
173
178
    
174
   <xsl:if test="$DisplayOPACiconsXSLT!='0'">
179
        <xsl:if test="$DisplayOPACiconsXSLT!='0'">
175
        <xsl:if test="$materialTypeCode!=''">
180
             <xsl:if test="$materialTypeCode!=''">
176
        <span class="results_summary type"><span class="label">Material type: </span>
181
             <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>
182
             <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"/>
183
             <xsl:value-of select="$materialTypeLabel"/>
179
        </span>
184
             </span>
185
             </xsl:if>
180
        </xsl:if>
186
        </xsl:if>
181
   </xsl:if>
187
        
182
188
        <!--Bug 13381 Resource Medium from 245 strips [] and / from string-->
189
        <xsl:if test="marc:datafield[@tag=245][marc:subfield[@code='h']]">
190
            <span class="results_summary type"><span class="label">Medium: </span>
191
                <xsl:variable name="str">
192
                    <xsl:for-each select="marc:datafield[@tag=245]">
193
                        <xsl:call-template name="subfieldSelect">
194
                            <xsl:with-param name="codes">h</xsl:with-param>
195
                        </xsl:call-template>
196
                    </xsl:for-each>                   
197
                </xsl:variable>
198
                <xsl:value-of select="translate($str,'[]/',' ')"/>
199
            </span>
200
        </xsl:if>  
201
            
183
        <!--Series: Alternate Graphic Representation (MARC 880) -->
202
        <!--Series: Alternate Graphic Representation (MARC 880) -->
184
        <xsl:if test="$display880">
203
        <xsl:if test="$display880">
185
            <xsl:call-template name="m880Select">
204
            <xsl:call-template name="m880Select">
186
- 

Return to bug 13381