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

(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (-1 / +4 lines)
Lines 1957-1960 div.ft { Link Here
1957
	font-size:90%;
1957
	font-size:90%;
1958
	list-style:disc outside url("../../images/item-bullet.gif");
1958
	list-style:disc outside url("../../images/item-bullet.gif");
1959
	padding:0.2em 0;
1959
	padding:0.2em 0;
1960
}
1960
}
1961
#plainmarc table { margin: .7em 0 0 0; font-family: monospace; font-size: 95%; }
1962
#plainmarc th { white-space: nowrap; text-align:left; vertical-align: top; padding: 2px; }
1963
#plainmarc td { padding : 2px; vertical-align: top; }
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl (-17 / +5 lines)
Lines 7-20 Link Here
7
	}); 
7
	}); 
8
//]]>
8
//]]>
9
</script>
9
</script>
10
<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" --><script type="text/javascript">
11
    var GB_ROOT_DIR = "/opac-tmpl/prog/en/lib/greybox/";
12
</script>
13
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS.js"></script>
14
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
15
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/gb_scripts.js"></script>
16
<link href="/opac-tmpl/prog/en/lib/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
17
<!-- /TMPL_IF -->
18
</head>
10
</head>
19
<body id="opac-isbddetail">
11
<body id="opac-isbddetail">
20
12
Lines 24-44 Link Here
24
16
25
17
26
    <div id="yui-main">
18
    <div id="yui-main">
27
    <div class="yui-b"><div id="opac-detail" class="yui-ge">
19
    <div class="yui-b">
20
    <div id="opac-detail" class="yui-ge">
28
    <div class="yui-u first">
21
    <div class="yui-u first">
29
    <div class="container">
22
    <div class="container">
30
    <div id="catalogue_detail_biblio">
23
    <div id="catalogue_detail_biblio">
31
	
24
	
32
     <h1 style="float:left;margin:0 1em 1em 0;">ISBD View</h1> <div id="views">
25
     <h1 style="float:left;margin:0 1em 1em 0;">ISBD View</h1> <div id="views">
33
	 <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" -->
26
	 <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>
34
<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>
27
35
       <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Expanded MARC View</a></span>
36
<!-- TMPL_ELSE -->
37
<span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">MARC View</a></span>
38
<!-- /TMPL_IF --> <span class="view"><span id="ISBDview">ISBD View</span></span>
39
</div>
40
    <div id="isbdcontents"><!-- TMPL_VAR name="ISBD" --></div>
28
    <div id="isbdcontents"><!-- TMPL_VAR name="ISBD" --></div>
41
	
29
42
	</div>
30
	</div>
43
	</div>
31
	</div>
44
	</div>
32
	</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl (-39 / +68 lines)
Lines 1-12 Link Here
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  MARC Details for Record No. <!-- TMPL_VAR name="biblionumber" -->
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  MARC Details for Record No. <!-- TMPL_VAR name="biblionumber" -->
2
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3
<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" --><script type="text/javascript">
3
<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
4
    var GB_ROOT_DIR = "/opac-tmpl/prog/en/lib/greybox/";
4
<script type="text/javascript">
5
//<![CDATA[
6
$(document).ready(function(){
7
    $.ajaxSetup({
8
        error:function(x,e){
9
            switch (x.status) {
10
                case 200: break;
11
                default:
12
                $('#switchview').parent().html("<div class=\"dialog alert\">"+_("Sorry, plain view is temporarily unavailable")+".</div>");
13
                $("#plainmarc").hide();
14
                $("#labeledmarc").show();
15
                break;
16
            }
17
        }
18
    });
19
20
    var loaded = 0;
21
    $("#switchview").toggle(
22
      function () {
23
        $(this).text(_("view labeled"));
24
        $("#labeledmarc").hide();
25
        if(!loaded){
26
            $("#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");
27
            loaded = 1;
28
        } else {
29
            $("#plainmarc").show();
30
        }
31
      },
32
      function () {
33
        $(this).text(_("view plain"));
34
        $("#labeledmarc").show();
35
        $("#plainmarc").hide();
36
      }
37
    );
38
});
39
//]]>
5
</script>
40
</script>
6
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS.js"></script>
7
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
8
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/gb_scripts.js"></script>
9
<link href="/opac-tmpl/prog/en/lib/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
10
<!-- /TMPL_IF -->
41
<!-- /TMPL_IF -->
11
</head>
42
</head>
12
<body id="opac-marcdetail">
43
<body id="opac-marcdetail">
Lines 15-42 Link Here
15
   <div id="bd">
46
   <div id="bd">
16
<!--TMPL_INCLUDE NAME="masthead.inc" -->
47
<!--TMPL_INCLUDE NAME="masthead.inc" -->
17
48
18
19
    <div id="yui-main">
49
    <div id="yui-main">
20
    <div class="yui-b"><div id="opac-detail" class="yui-ge">
50
    <div class="yui-b"><div id="opac-detail" class="yui-ge">
21
    <div class="yui-u first">
51
    <div class="yui-u first">
22
    <div class="container">
52
    <div class="container">
23
    <div id="catalogue_detail_biblio">
53
    <div id="catalogue_detail_biblio">
24
54
25
	<h1 style="float:left;margin: 0 1em 1em 0;">MARC View</h1>
55
    <h2 style="float:left;margin: 0 1em 1em 0;">MARC View</h2>
26
	<div id="views">
56
    <div id="views">
27
	<span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal View</a></span> 
57
    <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal View</a></span> 
28
29
<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
30
<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>
31
        <span class="view"><span id="MARCview">Expanded MARC View</span></span>
32
<!-- TMPL_ELSE -->
33
<span class="view"><span id="MARCview">MARC View</span>
34
<!-- /TMPL_IF -->
35
58
36
 <!-- 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 -->
59
<span class="view"><span id="MARCview">MARC View</span></span>
60
<!-- 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 -->
37
</div>
61
</div>
38
    <h1 style="clear:both;"><!-- TMPL_VAR NAME="bibliotitle" --> (Record no. <!-- TMPL_VAR NAME="biblionumber" -->)</h1>
62
    <h3 style="clear:both;"><!-- TMPL_VAR NAME="bibliotitle" --> (Record no. <!-- TMPL_VAR NAME="biblionumber" -->)</h3>
39
	<table id="marc">
63
    <!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" -->
64
    <div>[ <a id="switchview" href="/cgi-bin/koha/opac-showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->&amp;viewas=html">view plain</a> ]</div>
65
    <div id="plainmarc"></div><!-- /TMPL_IF -->
66
    <div id="labeledmarc">
67
    <table id="marc">
40
        <!-- TMPL_LOOP name="0XX" -->
68
        <!-- TMPL_LOOP name="0XX" -->
41
        <tr><th colspan="2"><!-- TMPL_VAR name="tag" --></th></tr>
69
        <tr><th colspan="2"><!-- TMPL_VAR name="tag" --></th></tr>
42
        <!-- TMPL_LOOP name="subfield" -->
70
        <!-- TMPL_LOOP name="subfield" -->
Lines 136-144 Link Here
136
            <!-- /TMPL_LOOP -->
164
            <!-- /TMPL_LOOP -->
137
        <!-- /TMPL_LOOP -->
165
        <!-- /TMPL_LOOP -->
138
    </table>
166
    </table>
167
    </div>
139
<!-- TMPL_IF NAME="item_header_loop" -->
168
<!-- TMPL_IF NAME="item_header_loop" -->
140
        <table id="items">
169
        <table id="items">
141
			<caption>Copies</caption>
170
            <caption>Copies</caption>
142
                <tr>
171
                <tr>
143
                    <!-- TMPL_LOOP name="item_header_loop" -->
172
                    <!-- TMPL_LOOP name="item_header_loop" -->
144
                        <th>
173
                        <th>
Lines 157-179 Link Here
157
    </div>
186
    </div>
158
    </div>
187
    </div>
159
    </div>
188
    </div>
160
	<div class="yui-u">
189
    <div class="yui-u">
161
	<div class="container">
190
    <div class="container">
162
<ul id="action">
191
<ul id="action">
163
192
164
<!-- TMPL_UNLESS NAME="norequests" -->
193
<!-- TMPL_UNLESS NAME="norequests" -->
165
        <!-- TMPL_IF NAME="opacuserlogin" -->
194
        <!-- TMPL_IF NAME="opacuserlogin" -->
166
		<!-- TMPL_IF NAME="RequestOnOpac" -->
195
        <!-- TMPL_IF NAME="RequestOnOpac" -->
167
			<!-- TMPL_IF NAME="AllowOnShelfHolds" -->
196
            <!-- TMPL_IF NAME="AllowOnShelfHolds" -->
168
				<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
197
                <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
169
			<!-- TMPL_ELSE -->
198
            <!-- TMPL_ELSE -->
170
				<!-- TMPL_IF NAME="ItemsIssued" -->
199
                <!-- TMPL_IF NAME="ItemsIssued" -->
171
					<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
200
                    <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li>
172
				<!-- /TMPL_IF -->
201
                <!-- /TMPL_IF -->
173
			<!-- /TMPL_IF -->
202
            <!-- /TMPL_IF -->
174
203
175
        	<!-- /TMPL_IF -->
204
            <!-- /TMPL_IF -->
176
	<!-- /TMPL_IF -->
205
    <!-- /TMPL_IF -->
177
<!-- /TMPL_UNLESS -->
206
<!-- /TMPL_UNLESS -->
178
        <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;">
207
        <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;">
179
            Print
208
            Print
Lines 190-200 Link Here
190
        </a></li><!-- /TMPL_IF -->
219
        </a></li><!-- /TMPL_IF -->
191
</ul>
220
</ul>
192
221
193
		<div id="export">
222
        <div id="export">
194
		<form method="get" action="/cgi-bin/koha/opac-export.pl">
223
        <form method="get" action="/cgi-bin/koha/opac-export.pl">
195
		<label for="format">Save Record:</label>
224
        <label for="format">Save Record:</label>
196
	    <select name="format" id="format">
225
        <select name="format" id="format">
197
		<option value="">-- Choose Format --</option>
226
        <option value="">-- Choose Format --</option>
198
        <option value="mods">MODS (XML)</option>
227
        <option value="mods">MODS (XML)</option>
199
        <option value="dc">Dublin Core (XML)</option>
228
        <option value="dc">Dublin Core (XML)</option>
200
        <option value="marcxml">MARCXML</option>
229
        <option value="marcxml">MARCXML</option>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl (-8 lines)
Lines 47-60 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
47
<style type="text/css">
47
<style type="text/css">
48
    #addtagl { display: none; }
48
    #addtagl { display: none; }
49
</style>
49
</style>
50
<!-- TMPL_IF NAME="OPACXSLTDetailsDisplay" --><script type="text/javascript">
51
    var GB_ROOT_DIR = "/opac-tmpl/prog/en/lib/greybox/";                               
52
</script>
53
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS.js"></script>
54
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
55
<script type="text/javascript" src="/opac-tmpl/prog/en/lib/greybox/gb_scripts.js"></script>
56
<link href="/opac-tmpl/prog/en/lib/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
57
<!-- /TMPL_IF -->
58
50
59
</head>
51
</head>
60
<body id="opac-detail">
52
<body id="opac-detail">
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-3 / +2 lines)
Lines 170-179 Link Here
170
        </xsl:choose>
170
        </xsl:choose>
171
        <div id="views">
171
        <div id="views">
172
        <span class="view"><span id="Normalview">Normal View</span> </span>
172
        <span class="view"><span id="Normalview">Normal View</span> </span>
173
        <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>
173
        <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>
174
        <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>
175
<xsl:if test="$ShowISBD!='0'">
174
<xsl:if test="$ShowISBD!='0'">
176
        <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>
175
        <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>
177
</xsl:if>
176
</xsl:if>
178
        </div>
177
        </div>
179
178
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACMARCdetail.xsl (+55 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
	<xsl:output method="html"/>
4
5
	<xsl:template match="/">
6
		<html>
7
			<xsl:apply-templates/>
8
		</html>
9
	</xsl:template>
10
11
	<xsl:template match="marc:record">
12
		<table>
13
			<tr>
14
				<th style="white-space:nowrap">
15
					000
16
				</th>
17
				<td colspan="2"></td>
18
				<td>
19
					<xsl:value-of select="marc:leader"/>
20
				</td>
21
			</tr>
22
			<xsl:apply-templates select="marc:datafield|marc:controlfield"/>
23
		</table>
24
	</xsl:template>
25
26
	<xsl:template match="marc:controlfield">
27
		<tr>
28
			<th style="white-space:nowrap">
29
				<xsl:value-of select="@tag"/>
30
			</th>
31
			<td colspan="2"></td>
32
			<td>
33
				<xsl:value-of select="."/>
34
			</td>
35
		</tr>
36
	</xsl:template>
37
38
	<xsl:template match="marc:datafield">
39
		<tr>
40
			<th style="white-space:nowrap">
41
				<xsl:value-of select="@tag"/>
42
			</th>
43
			<td><xsl:value-of select="@ind1"/></td>
44
			<td><xsl:value-of select="@ind2"/></td>
45
			<td><xsl:apply-templates select="marc:subfield"/></td>
46
		</tr>
47
	</xsl:template>
48
49
	<xsl:template match="marc:subfield">
50
		<strong>_<xsl:value-of select="@code"/></strong> <xsl:value-of select="."/>
51
		<xsl:choose>
52
		<xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose>
53
	</xsl:template>
54
55
</xsl:stylesheet>
(-)a/opac/opac-showmarc.pl (-12 / +24 lines)
Lines 63-79 if ($importid) { Link Here
63
}
63
}
64
		
64
		
65
if ($view eq 'card') {
65
if ($view eq 'card') {
66
$xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
66
    $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
67
my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/compact.xsl";
67
    my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/compact.xsl";
68
my $parser = XML::LibXML->new();
68
    my $parser = XML::LibXML->new();
69
my $xslt   = XML::LibXSLT->new();
69
    my $xslt   = XML::LibXSLT->new();
70
my $source = $parser->parse_string($xmlrecord);
70
    my $source = $parser->parse_string($xmlrecord);
71
my $style_doc = $parser->parse_file($xslfile);
71
    my $style_doc = $parser->parse_file($xslfile);
72
my $stylesheet = $xslt->parse_stylesheet($style_doc);
72
    my $stylesheet = $xslt->parse_stylesheet($style_doc);
73
my $results = $stylesheet->transform($source);
73
    my $results = $stylesheet->transform($source);
74
my $newxmlrecord = $stylesheet->output_string($results);
74
    my $newxmlrecord = $stylesheet->output_string($results);
75
#warn $newxmlrecord;
75
    #warn $newxmlrecord;
76
print $input->header(), $newxmlrecord;
76
    print $input->header(), $newxmlrecord;
77
    exit;
78
} elsif ($view eq 'html'){
79
    $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
80
    my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/MARC21slim2OPACMARCdetail.xsl";
81
    my $parser = XML::LibXML->new();
82
    my $xslt   = XML::LibXSLT->new();
83
    my $source = $parser->parse_string($xmlrecord);
84
    my $style_doc = $parser->parse_file($xslfile);
85
    my $stylesheet = $xslt->parse_stylesheet($style_doc);
86
    my $results = $stylesheet->transform($source);
87
    my $newxmlrecord = $stylesheet->output_string($results);
88
    #warn $newxmlrecord;
89
    print $input->header(), $newxmlrecord;
77
    exit;
90
    exit;
78
} else {
91
} else {
79
    $record =GetMarcBiblio($biblionumber) unless $record; 
92
    $record =GetMarcBiblio($biblionumber) unless $record; 
80
- 

Return to bug 5106