@@ -, +, @@ --- catalogue/showmarc.pl | 10 +++- .../intranet-tmpl/prog/en/css/staff-global.css | 7 ++ .../prog/en/modules/catalogue/detail.tt | 24 +++++++- koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl | 59 ++++++++++++++++++++ 4 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl --- a/catalogue/showmarc.pl +++ a/catalogue/showmarc.pl @@ -54,10 +54,16 @@ if(!ref $record) { exit; } -if($view eq 'card') { +if($view eq 'card' || $view eq 'html') { my $xml = $importid ? $record->as_xml(): GetXmlBiblio($biblionumber); - my $xsl = C4::Context->preference('marcflavour') eq 'UNIMARC' + my $xsl; + if ( $view eq 'card' ){ + $xsl = C4::Context->preference('marcflavour') eq 'UNIMARC' ? 'UNIMARC_compact.xsl' : 'compact.xsl'; + } + else { + $xsl = 'plainMARC.xsl'; + } my $htdocs = C4::Context->config('intrahtdocs'); my ($theme, $lang) = C4::Templates::themelanguage($htdocs, $xsl, 'intranet', $input); $xsl = "$htdocs/$theme/$lang/xslt/$xsl"; --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1724,6 +1724,13 @@ span.permissiondesc { color: black; } +#marcPreview table { border: 0; margin: .7em 0 0 0; font-family: monospace; font-size: 95%; } +#marcPreview th { background-color : #FFF; border: 0; white-space: nowrap; text-align:left; vertical-align: top; padding: 2px; } +#marcPreview td { border: 0; padding : 2px; vertical-align: top; } +#marcPreview tbody tr:nth-child(2n+1) td { background-color: #FFF; } +#marcPreview { width : 80%; margin-left : -40%; } +@media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } } + #cartDetails { background-color : #FFF; border: 1px solid #739acf; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -175,6 +175,15 @@ function verify_images() { [% IF ( LocalCoverImages && ! localimages.0 ) %] showNoImageMessage(); [% END %] + $("body").on("click",".previewMARC", function(e){ + e.preventDefault(); + var page = $(this).attr("href"); + $("#marcPreview .modal-body").load(page + " table"); + $('#marcPreview').modal({show:true}); + }); + $("#marcPreview").on("hidden", function(){ + $("#marcPreview .modal-body").html("
\"\" "+_("Loading")+"
"); + }); }); [% IF ( AmazonCoverImages ) %]$(window).load(function() { @@ -363,7 +372,7 @@ function verify_images() { [% END %] [% END %] - MARC Preview: Show + MARC Preview: Show [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonCoverImages ) %]
@@ -1009,7 +1018,18 @@ function verify_images() {
- + --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl +++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl @@ -0,0 +1,59 @@ + +]> + + + + + + MARC View + + + + + + + + + + + + + + +
+ 000 + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + _ + +
+
+ +
--