Bugzilla – Attachment 36172 Details for
Bug 10328
Rename opaccolorstylesheet to OpacAdditionalStyleSheet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 10328 - Rename opaccolorstylesheet to OpacAdditionalStylesheet
Signed-off-Bug-10328---Rename-opaccolorstylesheet-.patch (text/plain), 7.49 KB, created by
Marc Véron
on 2015-02-25 20:04:49 UTC
(
hide
)
Description:
[Signed-off] Bug 10328 - Rename opaccolorstylesheet to OpacAdditionalStylesheet
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-02-25 20:04:49 UTC
Size:
7.49 KB
patch
obsolete
>From d6ee6d2c0ef4e7388934e081d21ba37061ea65b4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 23 Feb 2015 16:24:12 +0100 >Subject: [PATCH] [Signed-off] Bug 10328 - Rename opaccolorstylesheet to > OpacAdditionalStylesheet >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan (from comment #1) >1) Apply this patch >2) Run updatedatabase.pl >3) Verify the system pref OpacColorStyleSheet still works > i.e. no change should be noted > >Additionally, I changed the path to an other stylesheet and verified that it worked. > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Auth.pm | 4 ++-- > C4/Templates.pm | 4 ++-- > installer/data/mysql/sysprefs.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 10 ++++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc | 8 ++++---- > 6 files changed, 20 insertions(+), 10 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 22f1e8e..26d41f5 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -459,7 +459,7 @@ sub get_template_and_user { > $opac_base_url = $ENV{'SERVER_NAME'} . ( $ENV{'SERVER_PORT'} eq ( $using_https ? "443" : "80" ) ? '' : ":$ENV{'SERVER_PORT'}" ); > } > $template->param( >- opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"), >+ OpacAdditionalStylesheet => C4::Context->preference("OpacAdditionalStylesheet"), > AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), > AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), > BranchesLoop => GetBranchesLoop($opac_name), >@@ -1156,7 +1156,7 @@ sub checkauth { > my $template = C4::Templates::gettemplate( $template_name, $type, $query ); > $template->param( > branchloop => GetBranchesLoop(), >- opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"), >+ OpacAdditionalStylesheet => C4::Context->preference("OpacAdditionalStylesheet"), > opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"), > login => 1, > INPUTS => \@inputs, >diff --git a/C4/Templates.pm b/C4/Templates.pm >index 52a7229..3befb5d 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -106,8 +106,8 @@ sub output { > $vars->{interface} = > ( $self->{interface} ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' ); > $vars->{theme} = $self->theme; >- $vars->{opaccolorstylesheet} = >- C4::Context->preference('opaccolorstylesheet'); >+ $vars->{OpacAdditionalStylesheet} = >+ C4::Context->preference('OpacAdditionalStylesheet'); > $vars->{opaclayoutstylesheet} = > C4::Context->preference('opaclayoutstylesheet'); > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 9020b4b..6e7ca15 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -245,7 +245,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacBrowser','0',NULL,'If ON, enables subject authorities browser on OPAC (needs to set misc/cronjob/sbuild_browser_and_cloud.pl)','YesNo'), > ('OpacBrowseResults','1',NULL,'Disable/enable browsing and paging search results from the OPAC detail page.','YesNo'), > ('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'), >-('opaccolorstylesheet','','','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'), >+('OpacAdditionalStylesheet','','','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'), > ('OpacCustomSearch','','70|10','Replace the search box on the OPAC with the provided HTML','Textarea'), > ('opaccredits','','70|10','Define HTML Credits at the bottom of the OPAC page','Textarea'), > ('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0ed56c6..c8d7ffe 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9793,6 +9793,16 @@ if(CheckVersion($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "3.19.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q| >+ UPDATE systempreferences set variable="OpacAdditionalStylesheet" WHERE variable="opaccolorstylesheet" >+ |); >+ print "Upgrade to $DBversion done (Bug 10328: Rename opaccolorstylesheet to OpacAdditionalStylesheet\n"; >+ SetVersion ($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >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 f0c0951..9b89b75 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 >@@ -187,7 +187,7 @@ OPAC: > class: code > - > - Include the additional CSS stylesheet >- - pref: opaccolorstylesheet >+ - pref: OpacAdditionalStylesheet > 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/bootstrap/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >index c3e2d83..a063346 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >@@ -21,11 +21,11 @@ > [% ELSE %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/[% opaclayoutstylesheet %]" /> > [% END %] >-[% IF ( opaccolorstylesheet ) %] >- [% IF (opaccolorstylesheet.match('^https?:|^\/')) %] >- <link rel="stylesheet" type="text/css" href="[% opaccolorstylesheet %]" /> >+[% IF ( OpacAdditionalStylesheet ) %] >+ [% IF (OpacAdditionalStylesheet.match('^https?:|^\/')) %] >+ <link rel="stylesheet" type="text/css" href="[% OpacAdditionalStylesheet %]" /> > [% ELSE %] >- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/[% opaccolorstylesheet %]" /> >+ <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/[% OpacAdditionalStylesheet %]" /> > [% END %] > [% END %] > [% IF ( opac_css_override ) %] >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10328
:
18377
|
18719
|
36123
|
36156
|
36172
|
36409