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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-2 / +26 lines)
Lines 215-221 Link Here
215
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+AND+(bib-level:a+OR+bib-level:b)</xsl:attribute>
215
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+AND+(bib-level:a+OR+bib-level:b)</xsl:attribute>
216
                    </xsl:when>
216
                    </xsl:when>
217
                    <xsl:otherwise>
217
                    <xsl:otherwise>
218
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:(<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/>)</xsl:attribute>
218
                        <xsl:variable name="title_query">
219
                            <xsl:text>Host-item:(</xsl:text>
220
                            <xsl:call-template name="quote_search_term">
221
                                <xsl:with-param name="term"><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']"/></xsl:with-param>
222
                            </xsl:call-template>
223
                            <xsl:text>)</xsl:text>
224
                        </xsl:variable>
225
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($title_query, true())"/></xsl:attribute>
219
                    </xsl:otherwise>
226
                    </xsl:otherwise>
220
                </xsl:choose>
227
                </xsl:choose>
221
                <xsl:text>Show analytics</xsl:text>
228
                <xsl:text>Show analytics</xsl:text>
Lines 1083-1090 Link Here
1083
                            </a>
1090
                            </a>
1084
                        </xsl:when>
1091
                        </xsl:when>
1085
                        <xsl:otherwise>
1092
                        <xsl:otherwise>
1093
                            <xsl:variable name="host_query">
1094
                                <xsl:text>ti,phr:(</xsl:text>
1095
                                <xsl:call-template name="quote_search_term">
1096
                                    <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1097
                                </xsl:call-template>
1098
                                <xsl:text>)</xsl:text>
1099
                                <xsl:if test="marc:subfield[@code='a']">
1100
                                    <xsl:text> AND au:(</xsl:text>
1101
                                    <xsl:call-template name="quote_search_term">
1102
                                        <xsl:with-param name="term">
1103
                                            <xsl:value-of select="marc:subfield[@code='a']"/>
1104
                                        </xsl:with-param>
1105
                                    </xsl:call-template>
1106
                                    <xsl:text>)</xsl:text>
1107
                                </xsl:if>
1108
                            </xsl:variable>
1086
                            <a>
1109
                            <a>
1087
                                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''), true())"/><xsl:if test="marc:subfield[@code='a']">+AND+au:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'], '()', ''), true())"/></xsl:if></xsl:attribute>
1110
                            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($host_query, true())" />
1111
                            </xsl:attribute>
1088
                                <xsl:value-of select="$f773"/>
1112
                                <xsl:value-of select="$f773"/>
1089
                            </a>
1113
                            </a>
1090
                        </xsl:otherwise>
1114
                        </xsl:otherwise>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (+29 lines)
Lines 578-583 Link Here
578
        </xsl:if>
578
        </xsl:if>
579
    </xsl:template>
579
    </xsl:template>
580
580
581
    <xsl:template name="quote_search_term">
582
        <xsl:param name="term" />
583
        <xsl:text>"</xsl:text>
584
        <xsl:call-template name="escape_quotes">
585
            <xsl:with-param name="text">
586
                <xsl:value-of select="$term"/>
587
            </xsl:with-param>
588
        </xsl:call-template>
589
        <xsl:text>"</xsl:text>
590
    </xsl:template>
591
592
    <xsl:template name="escape_quotes">
593
        <xsl:param name="text"/>
594
        <xsl:choose>
595
            <xsl:when test="contains($text, '&quot;')">
596
                <xsl:variable name="before" select="substring-before($text,'&quot;')"/>
597
                <xsl:variable name="next" select="substring-after($text,'&quot;')"/>
598
                <xsl:value-of select="$before"/>
599
                <xsl:text>\&quot;</xsl:text>
600
                <xsl:call-template name="escape_quotes">
601
                    <xsl:with-param name="text" select="$next"/>
602
                </xsl:call-template>
603
            </xsl:when>
604
            <xsl:otherwise>
605
                <xsl:value-of select="$text"/>
606
            </xsl:otherwise>
607
        </xsl:choose>
608
    </xsl:template>
609
581
</xsl:stylesheet>
610
</xsl:stylesheet>
582
611
583
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
612
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-2 / +26 lines)
Lines 257-263 Link Here
257
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+AND+(bib-level:a+OR+bib-level:b)</xsl:attribute>
257
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+AND+(bib-level:a+OR+bib-level:b)</xsl:attribute>
258
                    </xsl:when>
258
                    </xsl:when>
259
                    <xsl:otherwise>
259
                    <xsl:otherwise>
260
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:(<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/>)</xsl:attribute>
260
                        <xsl:variable name="title_query">
261
                            <xsl:text>Host-item:(</xsl:text>
262
                            <xsl:call-template name="quote_search_term">
263
                                <xsl:with-param name="term"><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']"/></xsl:with-param>
264
                            </xsl:call-template>
265
                            <xsl:text>)</xsl:text>
266
                        </xsl:variable>
267
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($title_query, true())"/></xsl:attribute>
261
                    </xsl:otherwise>
268
                    </xsl:otherwise>
262
                </xsl:choose>
269
                </xsl:choose>
263
                <xsl:text>Show analytics</xsl:text>
270
                <xsl:text>Show analytics</xsl:text>
Lines 1230-1237 Link Here
1230
                            </a>
1237
                            </a>
1231
                        </xsl:when>
1238
                        </xsl:when>
1232
                        <xsl:otherwise>
1239
                        <xsl:otherwise>
1240
                            <xsl:variable name="host_query">
1241
                                <xsl:text>ti,phr:(</xsl:text>
1242
                                <xsl:call-template name="quote_search_term">
1243
                                    <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1244
                                </xsl:call-template>
1245
                                <xsl:text>)</xsl:text>
1246
                                <xsl:if test="marc:subfield[@code='a']">
1247
                                    <xsl:text> AND au:(</xsl:text>
1248
                                    <xsl:call-template name="quote_search_term">
1249
                                        <xsl:with-param name="term">
1250
                                            <xsl:value-of select="marc:subfield[@code='a']"/>
1251
                                        </xsl:with-param>
1252
                                    </xsl:call-template>
1253
                                    <xsl:text>)</xsl:text>
1254
                                </xsl:if>
1255
                            </xsl:variable>
1233
                            <a>
1256
                            <a>
1234
                                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''), true())"/><xsl:if test="marc:subfield[@code='a']">+AND+au:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'], '()', ''), true())"/></xsl:if></xsl:attribute>
1257
                            <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($host_query, true())" />
1258
                            </xsl:attribute>
1235
                                <xsl:value-of select="$f773"/>
1259
                                <xsl:value-of select="$f773"/>
1236
                            </a>
1260
                            </a>
1237
                        </xsl:otherwise>
1261
                        </xsl:otherwise>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl (-1 / +29 lines)
Lines 542-547 Link Here
542
        </xsl:if>
542
        </xsl:if>
543
    </xsl:template>
543
    </xsl:template>
544
544
545
    <xsl:template name="quote_search_term">
546
        <xsl:param name="term" />
547
        <xsl:text>"</xsl:text>
548
        <xsl:call-template name="escape_quotes">
549
            <xsl:with-param name="text">
550
                <xsl:value-of select="$term"/>
551
            </xsl:with-param>
552
        </xsl:call-template>
553
        <xsl:text>"</xsl:text>
554
    </xsl:template>
555
556
    <xsl:template name="escape_quotes">
557
        <xsl:param name="text"/>
558
        <xsl:choose>
559
            <xsl:when test="contains($text, '&quot;')">
560
                <xsl:variable name="before" select="substring-before($text,'&quot;')"/>
561
                <xsl:variable name="next" select="substring-after($text,'&quot;')"/>
562
                <xsl:value-of select="$before"/>
563
                <xsl:text>\&quot;</xsl:text>
564
                <xsl:call-template name="escape_quotes">
565
                    <xsl:with-param name="text" select="$next"/>
566
                </xsl:call-template>
567
            </xsl:when>
568
            <xsl:otherwise>
569
                <xsl:value-of select="$text"/>
570
            </xsl:otherwise>
571
        </xsl:choose>
572
    </xsl:template>
573
545
</xsl:stylesheet>
574
</xsl:stylesheet>
546
575
547
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
576
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
548
- 

Return to bug 31106