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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 330-332 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
330
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
330
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
332
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');
332
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');
333
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define export options available on OPAC detail page.','','free');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 4619-4624 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4619
    SetVersion ($DBversion);
4619
    SetVersion ($DBversion);
4620
}
4620
}
4621
4621
4622
$DBversion = "3.07.99.XXX"; #FIXME
4623
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4624
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define available export options on OPAC detail page.','','free');");
4625
    print "Upgrade to $DBversion done (Bug 7345: Add system preference OpacExportOptions.)\n";
4626
    SetVersion($DBversion);
4627
}
4628
4629
4622
4630
4623
=head1 FUNCTIONS
4631
=head1 FUNCTIONS
4624
4632
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +8 lines)
Lines 132-138 OPAC: Link Here
132
              class: file
132
              class: file
133
            - to override specified settings from the default stylesheet. Enter the filename (if the file is in the server's css directory) or a complete URL beginning with <code>http://</code> (if the file lives on a remote server). Leave blank to disable.
133
            - to override specified settings from the default stylesheet. Enter the filename (if the file is in the server's css directory) or a complete URL beginning with <code>http://</code> (if the file lives on a remote server). Leave blank to disable.
134
        -
134
        -
135
            - Use the CSS stylesheet <!-- TMPL_VAR NAME="opacthemelang" -->/css/
135
            - Use the CSS stylesheet [% opacthemelang %]/css/
136
            - pref: opaclayoutstylesheet
136
            - pref: opaclayoutstylesheet
137
              class: file
137
              class: file
138
            - on all pages in the OPAC, instead of the default (leave blank to disable).
138
            - on all pages in the OPAC, instead of the default (leave blank to disable).
Lines 208-213 OPAC: Link Here
208
                  Results: "Results page only"
208
                  Results: "Results page only"
209
                  Both: "Both Details and Results pages"
209
                  Both: "Both Details and Results pages"
210
            - 'Note: The corresponding OPACXSLT option must be turned on.'
210
            - 'Note: The corresponding OPACXSLT option must be turned on.'
211
        -
212
            - 'List export options that should be available from OPAC detail page separated by |:'
213
            - pref: OpacExportOptions
214
              class: multi
215
            - '<br />Note: Available options are: BIBTEX (<code>bibtex</code>), Dublin Core (<code>dc</code>),'
216
            - 'MARCXML (<code>marcxml</code>), MARC-8 encoded MARC (<code>marc8</code>), Unicode/UTF-8 encoded MARC (<code>utf8</code>),'
217
            - 'Unicode/UTF-8 encoded MARC without local use (9xx, x9x, xx9) fields and subfields (<code>marcstd</code>), MODS (<code>mods</code>), RIS (<code>ris</code>)'
211
    Features:
218
    Features:
212
        -
219
        -
213
            - pref: opacuserlogin
220
            - pref: opacuserlogin
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-detail-sidebar.inc (+63 lines)
Line 0 Link Here
1
<ul id="action">
2
    [% UNLESS ( norequests ) %]
3
        [% IF ( opacuserlogin ) %]
4
            [% IF ( RequestOnOpac ) %]
5
                [% IF ( AllowOnShelfHolds ) %]
6
                    <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
7
                [% ELSE %]
8
                    [% IF ( ItemsIssued ) %]
9
                        <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
10
                    [% END %]
11
                [% END %]
12
            [% END %]
13
        [% END %]
14
    [% END %]
15
    <li><a class="print" href="#" onclick="window.print();">Print</a></li>
16
    [% IF ( virtualshelves ) %]
17
        [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
18
            <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
19
                Save to Your Lists
20
            </a></li>
21
        [% END %][% END %]
22
    [% END %]
23
    [% IF ( opacbookbag ) %]
24
        <li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to Your Cart</a></li>
25
    [% END %]
26
    <li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
27
</ul>
28
29
[% IF ( OPACSearchForTitleIn ) %]
30
    <div id="furtherm" class="yuimenu">
31
    <div class="bd">
32
    <h4>Search for this title in:</h4>
33
    <ul class="first-of-type">
34
        [% OPACSearchForTitleIn %]
35
    </ul>
36
    </div>
37
    </div>
38
[% END %]
39
40
[% IF ( export_options.size ) %]
41
    <div id="export" class="detailtagcell">
42
        <form method="get" action="/cgi-bin/koha/opac-export.pl">
43
        <label for="format">Save Record:</label>
44
        <select name="format" id="format">
45
        [% FOREACH option IN export_options %]
46
            [% SWITCH option %]
47
                [% CASE 'bibtex' %]<option value="bibtex">BIBTEX</option>
48
                [% CASE 'dc' %]<option value="dc">Dublin Core (XML)</option>
49
                [% CASE 'marcxml' %]<option value="marcxml">MARCXML</option>
50
                [% CASE 'marc8' %]<option value="marc8">MARC (non-Unicode/MARC-8)</option>
51
                [% CASE 'utf8' %]<option value="utf8">MARC (Unicode/UTF-8)</option>
52
                [% CASE 'marcstd' %]<option value="utf8">MARC (Unicode/UTF-8, Standard)</option>
53
                [% CASE 'mods' %]<option value="mods">MODS (XML)</option>
54
                [% CASE 'ris' %]<option value="ris">RIS</option>
55
                [% CASE %]<option value="[% option %]">[% option %]</option>
56
            [% END %]
57
        [% END %]
58
        </select>
59
        <input type="hidden" name="op" value="export" />
60
        <input type="hidden" name="bib" value="[% biblionumber %]" />
61
        <input type="submit" name="save" value="Go" /></form>
62
    </div>
63
[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt (-55 / +1 lines)
Lines 46-108 Link Here
46
	</div>
46
	</div>
47
	<div class="yui-u">
47
	<div class="yui-u">
48
	<div id="ulactioncontainer" class="container">
48
	<div id="ulactioncontainer" class="container">
49
<ul id="action">
50
49
51
[% UNLESS ( norequests ) %]
50
[% INCLUDE 'opac-detail-sidebar.inc' %]
52
        [% IF ( opacuserlogin ) %]
53
		[% IF ( RequestOnOpac ) %]
54
			[% IF ( AllowOnShelfHolds ) %]
55
				<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
56
			[% ELSE %]
57
				[% IF ( ItemsIssued ) %]
58
					<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
59
				[% END %]
60
			[% END %]
61
51
62
        	[% END %]
63
	[% END %]
64
[% END %]
65
        <li><a class="print" href="#" onclick="window.print();">Print</a></li>
66
[% IF ( virtualshelves ) %]
67
   [% IF ( opacuserlogin ) %] [% IF ( loggedinusername ) %]
68
        <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
69
            Save to Your Lists
70
        </a></li>
71
    [% END %][% END %]
72
[% END %]
73
        [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">
74
            Add to Your Cart
75
        </a></li>[% END %]
76
		<li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
77
</ul>
78
79
[% IF ( OPACSearchForTitleIn ) %]
80
<div id="furtherm" class="yuimenu">
81
<div class="bd">
82
<h4>Search for this title in:</h4>
83
<ul class="first-of-type">
84
85
[% OPACSearchForTitleIn %]
86
87
</ul>
88
</div>
89
</div>
90
[% END %]
91
92
		<div id="export">
93
		<form method="get" action="/cgi-bin/koha/opac-export.pl">
94
		<label for="format">Save Record:</label>
95
	    <select name="format" id="format">
96
		<option value="">-- Choose Format --</option>
97
 	    <option value="bibtex">BibTex</option>
98
        <option value="dc">Dublin Core (XML)</option>
99
        <option value="marcxml">MARCXML</option>
100
        <option value="marc8">MARC (non-Unicode/MARC-8)</option>
101
        <option value="utf8">MARC (Unicode/UTF-8)</option>
102
        <option value="mods">MODS (XML)</option>
103
 	    <option value="ris">RIS</option>    
104
		</select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
105
<input type="submit" name="save" value="Go" /></form></div>
106
</div>
52
</div>
107
</div>
53
</div>
108
</div>
54
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt (-54 / +1 lines)
Lines 201-262 $(document).ready(function(){ Link Here
201
    </div>
201
    </div>
202
    <div class="yui-u">
202
    <div class="yui-u">
203
    <div id="ulactioncontainer" class="container">
203
    <div id="ulactioncontainer" class="container">
204
<ul id="action">
205
204
206
[% UNLESS ( norequests ) %]
205
[% INCLUDE 'opac-detail-sidebar.inc' %]
207
        [% IF ( opacuserlogin ) %]
208
        [% IF ( RequestOnOpac ) %]
209
            [% IF ( AllowOnShelfHolds ) %]
210
                <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
211
            [% ELSE %]
212
                [% IF ( ItemsIssued ) %]
213
                    <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
214
                [% END %]
215
            [% END %]
216
217
            [% END %]
218
    [% END %]
219
[% END %]
220
        <li><a class="print" href="#" onclick="window.print();">
221
            Print
222
        </a></li>
223
[% IF ( virtualshelves ) %]
224
   [% IF ( opacuserlogin ) %] [% IF ( loggedinusername ) %]
225
        <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
226
            Save to Your Lists
227
        </a></li>
228
    [% END %][% END %]
229
[% END %]
230
        [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">
231
            Add to Your Cart
232
        </a></li>[% END %]
233
        <li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
234
</ul>
235
236
[% IF ( OPACSearchForTitleIn ) %]
237
<div id="furtherm" class="yuimenu">
238
<div class="bd">
239
<h4>Search for this title in:</h4>
240
<ul class="first-of-type">
241
242
[% OPACSearchForTitleIn %]
243
244
</ul>
245
</div>
246
</div>
247
[% END %]
248
206
249
        <div id="export">
250
        <form method="get" action="/cgi-bin/koha/opac-export.pl">
251
        <label for="format">Save Record:</label>
252
        <select name="format" id="format">
253
        <option value="">-- Choose Format --</option>
254
        <option value="mods">MODS (XML)</option>
255
        <option value="dc">Dublin Core (XML)</option>
256
        <option value="marcxml">MARCXML</option>
257
        <option value="marc8">MARC (non-Unicode/MARC-8)</option>
258
        <option value="utf8">MARC (Unicode/UTF-8)</option>    </select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
259
<input type="submit" name="save" value="Go" /></form></div>
260
</div>
207
</div>
261
</div>
208
</div>
262
</div>
209
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-54 / +1 lines)
Lines 1017-1077 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1017
        [% END %]
1017
        [% END %]
1018
    </div>
1018
    </div>
1019
[% END %]
1019
[% END %]
1020
<ul id="action">
1021
1022
[% UNLESS ( norequests ) %]
1023
        [% IF ( opacuserlogin ) %]
1024
		[% IF ( RequestOnOpac ) %]
1025
			[% IF ( AllowOnShelfHolds ) %]
1026
	            		<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
1027
			[% ELSE %]
1028
				[% IF ( ItemsIssued ) %]
1029
		            		<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
1030
				[% END %]
1031
			[% END %]
1032
        	[% END %]
1033
	[% END %]
1034
[% END %]
1035
        <li><a class="print" href="#" onclick="window.print();">Print</a></li>
1036
[% IF ( virtualshelves ) %]
1037
    [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
1038
        <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
1039
            Save to Your Lists
1040
        </a></li>
1041
    [% END %][% END %]
1042
[% END %]
1043
        [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to Your Cart</a></li>[% END %]
1044
		<li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
1045
</ul>
1046
1047
[% IF ( OPACSearchForTitleIn ) %]
1048
<div id="furtherm" class="yuimenu">
1049
<div class="bd">
1050
<h4>Search for this title in:</h4>
1051
<ul class="first-of-type">
1052
1053
[% OPACSearchForTitleIn %]
1054
1020
1055
</ul>
1021
[% INCLUDE 'opac-detail-sidebar.inc' %]
1056
</div>
1057
</div>
1058
[% END %]
1059
1060
        <div id="export" class="detailtagcell">
1061
        <form method="get" action="/cgi-bin/koha/opac-export.pl">
1062
        <label for="format">Save Record:</label>
1063
        <select name="format" id="format">
1064
        <option value="">-- Choose Format --</option>
1065
        <option value="bibtex">BIBTEX</option>
1066
        <option value="dc">Dublin Core (XML)</option>
1067
        <option value="marcxml">MARCXML</option>
1068
        <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1069
        <option value="utf8">MARC (Unicode/UTF-8)</option>    
1070
        <option value="mods">MODS (XML)</option>
1071
        <option value="ris">RIS</option>
1072
		</select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
1073
<input type="submit" name="save" value="Go" /></form>
1074
        </div>
1075
1022
1076
        [% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %]
1023
        [% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %]
1077
         <div id="NovelistSelect">
1024
         <div id="NovelistSelect">
(-)a/opac/opac-ISBDdetail.pl (+9 lines)
Lines 159-171 $template->param( Link Here
159
    reviews             => $reviews,
159
    reviews             => $reviews,
160
);
160
);
161
161
162
#Export options
163
my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
164
my @export_options = split(/\|/,$OpacExportOptions);
165
$template->{VARS}->{'export_options'} = \@export_options;
166
162
#Search for title in links
167
#Search for title in links
168
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
169
163
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
170
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
164
    $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
171
    $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
165
    $dat->{title} =~ s/\/+$//; # remove trailing slash
172
    $dat->{title} =~ s/\/+$//; # remove trailing slash
166
    $dat->{title} =~ s/\s+$//; # remove trailing space
173
    $dat->{title} =~ s/\s+$//; # remove trailing space
167
    $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
174
    $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
168
    $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
175
    $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
176
    $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g;
177
    $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g;
169
 $template->param('OPACSearchForTitleIn' => $search_for_title);
178
 $template->param('OPACSearchForTitleIn' => $search_for_title);
170
}
179
}
171
180
(-)a/opac/opac-MARCdetail.pl (-5 / +17 lines)
Lines 270-282 if(C4::Context->preference("ISBD")) { Link Here
270
	$template->param(ISBD => 1);
270
	$template->param(ISBD => 1);
271
}
271
}
272
272
273
#Export options
274
my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
275
my @export_options = split(/\|/,$OpacExportOptions);
276
$template->{VARS}->{'export_options'} = \@export_options;
277
273
#Search for title in links
278
#Search for title in links
279
my $marcflavour  = C4::Context->preference("marcflavour");
280
my $dat = TransformMarcToKoha( $dbh, $record );
281
my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
282
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
283
274
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
284
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
275
    $biblio->{author} ? $search_for_title =~ s/{AUTHOR}/$biblio->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
285
    $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
276
    $biblio->{title} =~ s/\/+$//; # remove trailing slash
286
    $dat->{title} =~ s/\/+$//; # remove trailing slash
277
    $biblio->{title} =~ s/\s+$//; # remove trailing space
287
    $dat->{title} =~ s/\s+$//; # remove trailing space
278
    $biblio->{title} ? $search_for_title =~ s/{TITLE}/$biblio->{title}/g : $search_for_title =~ s/{TITLE}//g;
288
    $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
279
    $biblio->{isbn} ? $search_for_title =~ s/{ISBN}/$biblio->{isbn}/g : $search_for_title =~ s/{ISBN}//g;
289
    $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
290
    $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g;
291
    $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g;
280
 $template->param('OPACSearchForTitleIn' => $search_for_title);
292
 $template->param('OPACSearchForTitleIn' => $search_for_title);
281
}
293
}
282
294
(-)a/opac/opac-detail.pl (-1 / +5 lines)
Lines 885-890 if (C4::Context->preference("OPACURLOpenInNewWindow")) { Link Here
885
    $template->param(covernewwindow => 'false');
885
    $template->param(covernewwindow => 'false');
886
}
886
}
887
887
888
#Export options
889
my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
890
my @export_options = split(/\|/,$OpacExportOptions);
891
$template->{VARS}->{'export_options'} = \@export_options;
892
888
#Search for title in links
893
#Search for title in links
889
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
894
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
890
895
891
- 

Return to bug 7392