bug 6919 - implements XSLTResultsDisplay and adding both unimarc and marc21 xslt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
6fe73327d6
commit
10eb5ae420
13
C4/Search.pm
13
C4/Search.pm
|
|
@ -1776,7 +1776,18 @@ sub searchResults {
|
|||
push @available_items_loop, $available_items->{$key}
|
||||
}
|
||||
|
||||
# if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
|
||||
# XSLT processing of some stuff
|
||||
use C4::Charset;
|
||||
SetUTF8Flag($marcrecord);
|
||||
$debug && warn $marcrecord->as_formatted;
|
||||
my $interface = $search_context eq 'opac' ? 'OPAC' : '';
|
||||
if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
|
||||
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results',
|
||||
$search_context, 1);
|
||||
# the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
|
||||
}
|
||||
|
||||
# if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
|
||||
if (!C4::Context->preference("item-level_itypes")) {
|
||||
if ($itemtypes{ $oldbiblio->{itemtype} }->{notforloan}) {
|
||||
$can_place_holds = 0;
|
||||
|
|
|
|||
|
|
@ -453,6 +453,9 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
|
|||
<input type="checkbox" class="selection" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" style="display:none" />
|
||||
</td>
|
||||
<td>
|
||||
[% IF ( SEARCH_RESULT.XSLTResultsRecord ) %]
|
||||
[% SEARCH_RESULT.XSLTResultsRecord %]
|
||||
[% ELSE %]
|
||||
<p>[% SEARCH_RESULT.result_number %].
|
||||
[% biblionumber = SEARCH_RESULT.biblionumber %]
|
||||
|
||||
|
|
@ -508,6 +511,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
|
|||
</p>
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
<p class="hold">[% IF ( SEARCH_RESULT.norequests ) %]
|
||||
<span class="noholdstext">No holds allowed</span>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
||||
xmlns:items="http://www.koha.org/items"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
exclude-result-prefixes="marc items">
|
||||
<xsl:import href="UNIMARCslimUtils.xsl"/>
|
||||
<xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
|
||||
<xsl:key name="item-by-status" match="items:item" use="items:status"/>
|
||||
<xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="marc:record">
|
||||
<xsl:variable name="leader" select="marc:leader"/>
|
||||
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
|
||||
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
|
||||
<xsl:variable name="biblionumber" select="marc:controlfield[@tag=001]"/>
|
||||
<xsl:variable name="isbn" select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/>
|
||||
|
||||
<xsl:if test="marc:datafield[@tag=200]">
|
||||
<xsl:for-each select="marc:datafield[@tag=200]">
|
||||
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:variable name="title" select="marc:subfield[@code='a']"/>
|
||||
<xsl:variable name="ntitle"
|
||||
select="translate($title, '˜œ슜슛슘슈슉','')"/>
|
||||
<xsl:value-of select="$ntitle" />
|
||||
</a>
|
||||
<xsl:if test="marc:subfield[@code='e']">
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:value-of select="marc:subfield[@code='e']"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:subfield[@code='b']">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:value-of select="marc:subfield[@code='b']"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:subfield[@code='h']">
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:value-of select="marc:subfield[@code='h']"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:subfield[@code='i']">
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:value-of select="marc:subfield[@code='i']"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:subfield[@code='f']">
|
||||
<xsl:text> / </xsl:text>
|
||||
<xsl:value-of select="marc:subfield[@code='f']"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:subfield[@code='g']">
|
||||
<xsl:text> ; </xsl:text>
|
||||
<xsl:value-of select="marc:subfield[@code='g']"/>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="tag_4xx" />
|
||||
|
||||
<xsl:call-template name="tag_210" />
|
||||
|
||||
<xsl:call-template name="tag_215" />
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Loading…
Reference in New Issue