From: Kyle M Hall <[email protected]>
Signed-off-by: Srdjan <[email protected]>
---
C4/Auth.pm | 4 ++--
C4/Templates.pm | 4 ++--
installer/data/mysql/sysprefs.sql | 2 +-
installer/data/mysql/updatedatabase.pl | 6 ++++++
.../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 2 +-
koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc | 8 ++++----
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc | 8 ++++----
7 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index 9dba387..0923233 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -386,7 +386,7 @@ sub get_template_and_user {
$opac_name = C4::Context->userenv->{'branch'};
}
$template->param(
- opaccolorstylesheet =>
C4::Context->preference("opaccolorstylesheet"),
+ OpacColorStyleSheet =>
C4::Context->preference("OpacColorStyleSheet"),
AnonSuggestions => "" .
C4::Context->preference("AnonSuggestions"),
AuthorisedValueImages =>
C4::Context->preference("AuthorisedValueImages"),
BranchesLoop => GetBranchesLoop($opac_name),
@@ -986,7 +986,7 @@ sub checkauth {
my $template = C4::Templates::gettemplate($template_name, $type, $query );
$template->param(
branchloop => GetBranchesLoop(),
- opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"),
+ OpacColorStyleSheet => C4::Context->preference("OpacColorStyleSheet"),
opaclayoutstylesheet =>
C4::Context->preference("opaclayoutstylesheet"),
login => 1,
INPUTS => \@inputs,
diff --git a/C4/Templates.pm b/C4/Templates.pm
index 88b9b01..bc328b7 100644
--- a/C4/Templates.pm
+++ b/C4/Templates.pm
@@ -107,8 +107,8 @@ sub output {
$vars->{interface} =
( $self->{interface} ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' );
$vars->{theme} = $self->theme;
- $vars->{opaccolorstylesheet} =
- C4::Context->preference('opaccolorstylesheet');
+ $vars->{OpacColorStyleSheet} =
+ C4::Context->preference('OpacColorStyleSheet');
$vars->{opacsmallimage} = C4::Context->preference('opacsmallimage');
$vars->{opaclayoutstylesheet} =
C4::Context->preference('opaclayoutstylesheet');
diff --git a/installer/data/mysql/sysprefs.sql
b/installer/data/mysql/sysprefs.sql
index 31485bc..d9bd59e 100644
--- a/installer/data/mysql/sysprefs.sql
+++ b/installer/data/mysql/sysprefs.sql
@@ -67,7 +67,7 @@ INSERT INTO `systempreferences`
(variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES ('intranetbookbag','1','If ON, enables display of Cart feature in the
intranet','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('OpacBrowser',0,'If ON, enables subject authorities browser on OPAC
(needs to set misc/cronjob/sbuild_browser_and_cloud.pl)',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('OpacCloud',0,'If ON, enables subject cloud on OPAC',NULL,'YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('opaccolorstylesheet','colors.css','Define an auxiliary stylesheet for
OPAC use, to override specified settings from the primary opac.css stylesheet.
Enter the filename (if the file is in the server\'s css directory) or a
complete URL beginning with http (if the file lives on a remote
server).','','free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('OpacColorStyleSheet','colors.css','Define an auxiliary stylesheet for
OPAC use, to override specified settings from the primary opac.css stylesheet.
Enter the filename (if the file is in the server\'s css directory) or a
complete URL beginning with http (if the file lives on a remote
server).','','free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('opaccredits','','Define HTML Credits at the bottom of the OPAC
page','70|10','Textarea');
INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('opacSerialDefaultTab', 'subscriptions', 'Define the default tab for
serials in OPAC.', 'holdings|serialcollection|subscriptions', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type)
VALUES('opacheader','','Add HTML to be included as a custom header in the
OPAC','70|10','Textarea');
diff --git a/installer/data/mysql/updatedatabase.pl
b/installer/data/mysql/updatedatabase.pl
index f3a90d8..089d2c9 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -6983,6 +6983,12 @@ INSERT INTO systempreferences
(variable,value,explanation,options,type) VALUES (
SetVersion($DBversion);
}
+$DBversion = "3.13.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("UPDATE systempreferences SET variable = 'OpacColorStyleSheet'
WHERE variable = 'opaccolorstylesheet'");
+ print "Upgrade to $DBversion done (Bug 10328 - Rename opaccolorstylesheet
to OpacColorStyleSheet)\n";
+ SetVersion ($DBversion);
+}
=head1 FUNCTIONS
diff --git
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
index 81824e4..96c2f1f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -159,7 +159,7 @@ OPAC:
class: code
-
- Include the additional CSS stylesheet
- - pref: opaccolorstylesheet
+ - pref: OpacColorStyleSheet
class: file
- to override specified settings from the default stylesheet
(leave blank to disable). Enter just a filename, a full local path or a
complete URL starting with <code>http://</code> (if the file lives on a remote
server). Please note that if you just enter a filename, the file should be in
the css subdirectory for each active theme and language within the Koha
templates directory. A full local path is expected to start from your HTTP
document root.
-
diff --git a/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc
b/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc
index fcbab2a..df648a6 100644
--- a/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc
+++ b/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc
@@ -11,11 +11,11 @@
[% ELSE %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/[%
opaclayoutstylesheet %]" />
[% END %]
-[% IF ( opaccolorstylesheet ) %]
- [% IF (opaccolorstylesheet.match('^https?:|^\/')) %]
- <link rel="stylesheet" type="text/css" href="[% opaccolorstylesheet
%]" />
+[% IF ( OpacColorStyleSheet ) %]
+ [% IF (OpacColorStyleSheet.match('^https?:|^\/')) %]
+ <link rel="stylesheet" type="text/css" href="[% OpacColorStyleSheet
%]" />
[% ELSE %]
- <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[%
opaccolorstylesheet %]" />
+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[%
OpacColorStyleSheet %]" />
[% END %]
[% END %]
[% IF ( opac_css_override ) %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
index 147b82c..5895fe9 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
@@ -9,11 +9,11 @@
[% ELSE %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/[%
opaclayoutstylesheet %]" />
[% END %]
-[% IF ( opaccolorstylesheet ) %]
- [% IF (opaccolorstylesheet.match('^https?:|^\/')) %]
- <link rel="stylesheet" type="text/css" href="[% opaccolorstylesheet
%]" />
+[% IF ( OpacColorStyleSheet ) %]
+ [% IF (OpacColorStyleSheet.match('^https?:|^\/')) %]
+ <link rel="stylesheet" type="text/css" href="[% OpacColorStyleSheet
%]" />
[% ELSE %]
- <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[%
opaccolorstylesheet %]" />
+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[%
OpacColorStyleSheet %]" />
[% END %]
[% END %]
[% IF ( opac_css_override ) %]
--
1.8.1.2
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/