diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index bfff594be2..68cc572a2f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2000,3 +2000,8 @@ div.ft { 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; } + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl index 475d681ebf..305dfced89 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl @@ -21,14 +21,6 @@ }); //]]> - - - - - - @@ -38,21 +30,17 @@
-
+
+ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl index 8f5182e37e..fba0c08c24 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl @@ -17,16 +17,42 @@ YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu); }); - 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("
"+_("Sorry, plain view is temporarily unavailable")+".
"); + $("#plainmarc").hide(); + $("#labeledmarc").show(); + break; + } + } + }); + + var loaded = 0; + $("#switchview").toggle( + function () { + $(this).text(_("view labeled")); + $("#labeledmarc").hide(); + if(!loaded){ + $("#plainmarc").show().html("
"+_("Loading")+"...
").load("/cgi-bin/koha/opac-showmarc.pl","id=&viewas=html"); + loaded = 1; + } else { + $("#plainmarc").show(); + } + }, + function () { + $(this).text(_("view plain")); + $("#labeledmarc").show(); + $("#plainmarc").hide(); + } + ); +}); //]]> - - - - - - @@ -34,28 +60,25 @@
-
-

MARC View

-
- ">Normal View +

MARC View

+
+ ">Normal View - -" title="MARC" rel="gb_page_center[600,500]">MARC View - Expanded MARC View - -MARC View - - - ">ISBD View +MARC View +">ISBD View
-

(Record no. )

- +

(Record no. )

+ + +
+
+
@@ -155,9 +178,10 @@
+
- + + + + + + + + + + + + + + + + + + _ + +
+
+ + \ No newline at end of file diff --git a/koha-tmpl/opac-tmpl/prog/images/loading.gif b/koha-tmpl/opac-tmpl/prog/images/loading.gif new file mode 100644 index 0000000000..3c2f7c0588 Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/images/loading.gif differ diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index b3799176d4..9c70d5684a 100755 --- a/opac/opac-showmarc.pl +++ b/opac/opac-showmarc.pl @@ -63,17 +63,30 @@ if ($importid) { } 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;
CopiesCopies
@@ -176,23 +200,23 @@ -
-
+
+ -
+ + + +
+ +