From: Zachary Spalding <[email protected]> It is possible to use an environment variable to specify a custom stylesheet for different libraries in a multi-library system: $ENV{'OPAC_CSS_OVERRIDE'}. This patch adds an additional option to override the CCSR theme's mobile stylesheet.
The changes in this patch are courtesy Zachary Spalding as described in Bug 9558. Patch and test plan created by Owen Leonard. Signed-off-by: Srdjan <[email protected]> --- C4/Auth.pm | 1 + koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index 9dba387..d68b41e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -409,6 +409,7 @@ sub get_template_and_user { OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . ($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, + opac_css_override_mobile => $ENV{'OPAC_CSS_OVERRIDE_MOBILE'}, opac_search_limit => $opac_search_limit, opac_limit_override => $opac_limit_override, OpacBrowser => C4::Context->preference("OpacBrowser"), 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..eb71770 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 @@ -18,6 +18,9 @@ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opaccolorstylesheet %]" /> [% END %] [% END %] +[% IF ( opac_css_override_mobile ) %] + <link rel="stylesheet" type="text/css" media="screen and (max-width:700px)" href="[% themelang %]/css/[% opac_css_override_mobile %]" /> + [% END %] [% IF ( opac_css_override ) %] <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opac_css_override %]" /> [% END %] -- 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/
