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

(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 328-331 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
328
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
328
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
329
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');
329
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('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
330
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
331
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 (+9 lines)
Lines 4585-4590 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4585
    SetVersion($DBversion);
4585
    SetVersion($DBversion);
4586
}
4586
}
4587
4587
4588
$DBversion = "3.06.03.XXX";
4589
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4590
    $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');");
4591
    print "Upgrade to $DBversion done (Bug 7345: Add system preference OpacExportOptions.)\n";
4592
    SetVersion($DBversion);
4593
}
4594
4595
4596
4588
=head1 FUNCTIONS
4597
=head1 FUNCTIONS
4589
4598
4590
=head2 DropAllForeignKeys($table)
4599
=head2 DropAllForeignKeys($table)
(-)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 1013-1073 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1013
        [% END %]
1013
        [% END %]
1014
    </div>
1014
    </div>
1015
[% END %]
1015
[% END %]
1016
<ul id="action">
1017
1018
[% UNLESS ( norequests ) %]
1019
        [% IF ( opacuserlogin ) %]
1020
		[% IF ( RequestOnOpac ) %]
1021
			[% IF ( AllowOnShelfHolds ) %]
1022
	            		<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
1023
			[% ELSE %]
1024
				[% IF ( ItemsIssued ) %]
1025
		            		<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
1026
				[% END %]
1027
			[% END %]
1028
        	[% END %]
1029
	[% END %]
1030
[% END %]
1031
        <li><a class="print" href="#" onclick="window.print();">Print</a></li>
1032
[% IF ( virtualshelves ) %]
1033
    [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
1034
        <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
1035
            Save to Your Lists
1036
        </a></li>
1037
    [% END %][% END %]
1038
[% END %]
1039
        [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to Your Cart</a></li>[% END %]
1040
		<li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
1041
</ul>
1042
1043
[% IF ( OPACSearchForTitleIn ) %]
1044
<div id="furtherm" class="yuimenu">
1045
<div class="bd">
1046
<h4>Search for this title in:</h4>
1047
<ul class="first-of-type">
1048
1049
[% OPACSearchForTitleIn %]
1050
1016
1051
</ul>
1017
[% INCLUDE 'opac-detail-sidebar.inc' %]
1052
</div>
1053
</div>
1054
[% END %]
1055
1056
        <div id="export" class="detailtagcell">
1057
        <form method="get" action="/cgi-bin/koha/opac-export.pl">
1058
        <label for="format">Save Record:</label>
1059
        <select name="format" id="format">
1060
        <option value="">-- Choose Format --</option>
1061
        <option value="bibtex">BIBTEX</option>
1062
        <option value="dc">Dublin Core (XML)</option>
1063
        <option value="marcxml">MARCXML</option>
1064
        <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1065
        <option value="utf8">MARC (Unicode/UTF-8)</option>    
1066
        <option value="mods">MODS (XML)</option>
1067
        <option value="ris">RIS</option>
1068
		</select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
1069
<input type="submit" name="save" value="Go" /></form>
1070
        </div>
1071
1018
1072
        [% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %]
1019
        [% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %]
1073
         <div id="NovelistSelect">
1020
         <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 881-886 if (C4::Context->preference("OPACURLOpenInNewWindow")) { Link Here
881
    $template->param(covernewwindow => 'false');
881
    $template->param(covernewwindow => 'false');
882
}
882
}
883
883
884
#Export options
885
my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
886
my @export_options = split(/\|/,$OpacExportOptions);
887
$template->{VARS}->{'export_options'} = \@export_options;
888
884
#Search for title in links
889
#Search for title in links
885
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
890
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
886
891
887
- 

Return to bug 7345