background-color : rgb(239, 254, 213);
background-color : rgba(239, 254, 213, 0.4);
}
+
+#plainmarc table { border: 0; margin: .7em 0 0 0; font-family: monospace; font-size: 95%; }
+#plainmarc th { background-color : #FFF; border: 0; white-space: nowrap; text-align:left; vertical-align: top; padding: 2px; }
+#plainmarc td { border: 0; padding : 2px; vertical-align: top; }
+
});
//]]>
</script>
-<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" --><script type="text/javascript">
- var GB_ROOT_DIR = "/opac-tmpl/prog/en/lib/greybox/";
-</script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS.js"></script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/gb_scripts.js"></script>
-<link href="/opac-tmpl/prog/en/lib/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
-<!-- /TMPL_IF -->
</head>
<body id="opac-isbddetail">
<div id="yui-main">
- <div class="yui-b"><div id="opac-detail" class="yui-ge">
+ <div class="yui-b">
+ <div id="opac-detail" class="yui-ge">
<div class="yui-u first">
<div class="container">
<div id="catalogue_detail_biblio">
<h1 style="float:left;margin:0 1em 1em 0;">ISBD View</h1> <div id="views">
- <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal View</a></span> <!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
-<span class="view"><a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">MARC View</a></span>
- <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Expanded MARC View</a></span>
-<!-- TMPL_ELSE -->
-<span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">MARC View</a></span>
-<!-- /TMPL_IF --> <span class="view"><span id="ISBDview">ISBD View</span></span>
-</div>
+ <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal View</a></span> <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">MARC View</a></span> <span class="view"><span id="ISBDview">ISBD View</span></span></div>
+
<div id="isbdcontents"><!-- TMPL_VAR name="ISBD" --></div>
-
+
</div>
</div>
</div>
YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu);
});
<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
- var GB_ROOT_DIR = "/opac-tmpl/prog/en/lib/greybox/";
+$(document).ready(function(){
+ $.ajaxSetup({
+ error:function(x,e){
+ switch (x.status) {
+ case 200: break;
+ default:
+ $('#switchview').parent().html("<div class=\"dialog alert\">"+_("Sorry, plain view is temporarily unavailable")+".</div>");
+ $("#plainmarc").hide();
+ $("#labeledmarc").show();
+ break;
+ }
+ }
+ });
+
+ var loaded = 0;
+ $("#switchview").toggle(
+ function () {
+ $(this).text(_("view labeled"));
+ $("#labeledmarc").hide();
+ if(!loaded){
+ $("#plainmarc").show().html("<div style=\"margin:1em;padding:1em;border:1px solid #EEE;font-size:150%;\"><img src=\"/opac-tmpl/prog/images/loading.gif\" /> "+_("Loading")+"...</div>").load("/cgi-bin/koha/opac-showmarc.pl","id=<!-- TMPL_VAR name="biblionumber" -->&viewas=html");
+ loaded = 1;
+ } else {
+ $("#plainmarc").show();
+ }
+ },
+ function () {
+ $(this).text(_("view plain"));
+ $("#labeledmarc").show();
+ $("#plainmarc").hide();
+ }
+ );
+});
<!-- /TMPL_IF -->
//]]>
</script>
-<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS.js"></script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/gb_scripts.js"></script>
-<link href="/opac-tmpl/prog/en/lib/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
-<!-- /TMPL_IF -->
</head>
<body id="opac-marcdetail">
<div id="bd">
<!--TMPL_INCLUDE NAME="masthead.inc" -->
-
<div id="yui-main">
<div class="yui-b"><div id="opac-detail" class="yui-ge">
<div class="yui-u first">
<div class="container">
<div id="catalogue_detail_biblio">
- <h1 style="float:left;margin: 0 1em 1em 0;">MARC View</h1>
- <div id="views">
- <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal View</a></span>
-
-<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
-<span class="view"><a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">MARC View</a></span>
- <span class="view"><span id="MARCview">Expanded MARC View</span></span>
-<!-- TMPL_ELSE -->
-<span class="view"><span id="MARCview">MARC View</span>
-<!-- /TMPL_IF -->
+ <h2 style="float:left;margin: 0 1em 1em 0;">MARC View</h2>
+ <div id="views">
+ <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal View</a></span>
- <!-- TMPL_IF NAME="ISBD" --><span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">ISBD View</a></span><!-- /TMPL_IF -->
+<span class="view"><span id="MARCview">MARC View</span></span>
+<!-- TMPL_IF NAME="ISBD" --><span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">ISBD View</a></span><!-- /TMPL_IF -->
</div>
- <h1 style="clear:both;"><!-- TMPL_VAR NAME="bibliotitle" --> (Record no. <!-- TMPL_VAR NAME="biblionumber" -->)</h1>
- <table id="marc">
+ <h3 style="clear:both;"><!-- TMPL_VAR NAME="bibliotitle" --> (Record no. <!-- TMPL_VAR NAME="biblionumber" -->)</h3>
+ <!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
+ <div>[ <a id="switchview" href="/cgi-bin/koha/opac-showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->&viewas=html">view plain</a> ]</div>
+ <div id="plainmarc"></div><!-- /TMPL_IF -->
+ <div id="labeledmarc">
+ <table id="marc">
<!-- TMPL_LOOP name="0XX" -->
<tr><th colspan="2"><!-- TMPL_VAR name="tag" --></th></tr>
<!-- TMPL_LOOP name="subfield" -->
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
</table>
+ </div>
<!-- TMPL_IF NAME="item_header_loop" -->
<table id="items">
- <caption>Copies</caption>
+ <caption>Copies</caption>
<tr>
<!-- TMPL_LOOP name="item_header_loop" -->
<th>
</div>
</div>
</div>
- <div class="yui-u">
- <div class="container">
+ <div class="yui-u">
+ <div class="container">
<ul id="action">
<!-- TMPL_UNLESS NAME="norequests" -->
<!-- TMPL_IF NAME="opacuserlogin" -->
- <!-- TMPL_IF NAME="RequestOnOpac" -->
- <!-- TMPL_IF NAME="AllowOnShelfHolds" -->
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
- <!-- TMPL_ELSE -->
- <!-- TMPL_IF NAME="ItemsIssued" -->
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
- <!-- /TMPL_IF -->
- <!-- /TMPL_IF -->
-
- <!-- /TMPL_IF -->
- <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="RequestOnOpac" -->
+ <!-- TMPL_IF NAME="AllowOnShelfHolds" -->
+ <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
+ <!-- TMPL_ELSE -->
+ <!-- TMPL_IF NAME="ItemsIssued" -->
+ <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
+
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
<!-- /TMPL_UNLESS -->
<li><a class="print" href="/cgi-bin/koha/opac-detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" onclick="Dopop('opac-detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->'); return false;">
Print
</div>
<!-- /TMPL_IF -->
- <div id="export">
- <form method="get" action="/cgi-bin/koha/opac-export.pl">
- <label for="format">Save Record:</label>
- <select name="format" id="format">
- <option value="">-- Choose Format --</option>
+ <div id="export">
+ <form method="get" action="/cgi-bin/koha/opac-export.pl">
+ <label for="format">Save Record:</label>
+ <select name="format" id="format">
+ <option value="">-- Choose Format --</option>
<option value="mods">MODS (XML)</option>
<option value="dc">Dublin Core (XML)</option>
<option value="marcxml">MARCXML</option>
<style type="text/css">
#addtagl { display: none; }
</style>
-<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" --><script type="text/javascript">
- var GB_ROOT_DIR = "/opac-tmpl/prog/en/lib/greybox/";
-</script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS.js"></script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/gb_scripts.js"></script>
-<link href="/opac-tmpl/prog/en/lib/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
-<!-- /TMPL_IF -->
</head>
<body id="opac-detail">
</xsl:choose>
<div id="views">
<span class="view"><span id="Normalview">Normal View</span> </span>
- <span class="view"><a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC" rel="gb_page_center[600,500]">MARC View</a></span>
- <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC">Expanded MARC View</a></span>
+ <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC">MARC View</a></span>
<xsl:if test="$ShowISBD!='0'">
- <span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}">Card View (ISBD)</a></span>
+ <span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}">ISBD View</a></span>
</xsl:if>
</div>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html"/>
+
+ <xsl:template match="/">
+ <html>
+ <xsl:apply-templates/>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="marc:record">
+ <table>
+ <tr>
+ <th style="white-space:nowrap">
+ 000
+ </th>
+ <td colspan="2"></td>
+ <td>
+ <xsl:value-of select="marc:leader"/>
+ </td>
+ </tr>
+ <xsl:apply-templates select="marc:datafield|marc:controlfield"/>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="marc:controlfield">
+ <tr>
+ <th style="white-space:nowrap">
+ <xsl:value-of select="@tag"/>
+ </th>
+ <td colspan="2"></td>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield">
+ <tr>
+ <th style="white-space:nowrap">
+ <xsl:value-of select="@tag"/>
+ </th>
+ <td><xsl:value-of select="@ind1"/></td>
+ <td><xsl:value-of select="@ind2"/></td>
+ <td><xsl:apply-templates select="marc:subfield"/></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="marc:subfield">
+ <strong>_<xsl:value-of select="@code"/></strong> <xsl:value-of select="."/>
+ <xsl:choose>
+ <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
}
if ($view eq 'card') {
-$xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
-my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/compact.xsl";
-my $parser = XML::LibXML->new();
-my $xslt = XML::LibXSLT->new();
-my $source = $parser->parse_string($xmlrecord);
-my $style_doc = $parser->parse_file($xslfile);
-my $stylesheet = $xslt->parse_stylesheet($style_doc);
-my $results = $stylesheet->transform($source);
-my $newxmlrecord = $stylesheet->output_string($results);
-#warn $newxmlrecord;
-print $input->header(), $newxmlrecord;
+ $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
+ my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/compact.xsl";
+ my $parser = XML::LibXML->new();
+ my $xslt = XML::LibXSLT->new();
+ my $source = $parser->parse_string($xmlrecord);
+ my $style_doc = $parser->parse_file($xslfile);
+ my $stylesheet = $xslt->parse_stylesheet($style_doc);
+ my $results = $stylesheet->transform($source);
+ my $newxmlrecord = $stylesheet->output_string($results);
+ #warn $newxmlrecord;
+ print $input->header(), $newxmlrecord;
+ exit;
+} elsif ($view eq 'html'){
+ $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
+ my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/MARC21slim2OPACMARCdetail.xsl";
+ my $parser = XML::LibXML->new();
+ my $xslt = XML::LibXSLT->new();
+ my $source = $parser->parse_string($xmlrecord);
+ my $style_doc = $parser->parse_file($xslfile);
+ my $stylesheet = $xslt->parse_stylesheet($style_doc);
+ my $results = $stylesheet->transform($source);
+ my $newxmlrecord = $stylesheet->output_string($results);
+ #warn $newxmlrecord;
+ print $input->header(), $newxmlrecord;
exit;
} else {
$record =GetMarcBiblio($biblionumber) unless $record;