INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACShowUnusedAuthorities','1','','Show authorities that are not being used in the OPAC.','YesNo');
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
-
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
SetVersion($DBversion);
}
+$DBversion ="XXX";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free')");
+ print "Upgrade to $DBversion done (Add system preference IntranetSlipPrinterJS))\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
- pref: intranetstylesheet
class: url
- on all pages in the staff interface, instead of the default. (This should be a complete URL, starting with <code>http://</code>.)
+ -
+ - "Use the following JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/:"
+ - pref: IntranetSlipPrinterJS
+ type: textarea
+ class: code
-
- "Include the following CSS on all pages in the staff client:"
- pref: IntranetUserCSS
[% END %]
<script language="javascript">
- function printThenClose() {
- window.print();
- window.close();
- }
+[% IF ( IntranetSlipPrinterJS ) %]
+ [% IntranetSlipPrinterJS %]
+[% ELSE %]
+ function printThenClose() {
+ window.print();
+ window.close();
+ }
+[% END %]
</script>
</head>
<body id="circ_printslip" class="circ" onload="printThenClose();">
error => $error,
);
+$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS' ) );
+
output_html_with_http_headers $input, $cookie, $template->output;