Bug 11038: Enable use of IntranetUserCSS on staff client login page
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Sat, 28 Nov 2015 14:33:37 +0000 (11:33 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 11 Dec 2015 15:42:49 +0000 (15:42 +0000)
This patch enable use of IntranetUserCss on staff client
login page.

To test:
1) Add something to IntranetUserCSS to modify login page,
for example

 #login h1 a {
   height:30px;
 }

2) Logout from staff client, no changes on login page.
3) Apply the patch
4) Reload, now logo is cut in half :)
Bonus) Login again an try changing image, add

 #login h1 {
  background: url(http://example.com/img/other-logo.png) no-repeat top center;
 }

and fix height. Logout and check

This also affects 3.20 and perhaps earlier versions.
Re-upload to fix examples

Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Auth.pm
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc

index 8c6d747..8512fd9 100644 (file)
@@ -1229,6 +1229,7 @@ sub checkauth {
         intranetbookbag                       => C4::Context->preference("intranetbookbag"),
         IntranetNav                           => C4::Context->preference("IntranetNav"),
         IntranetFavicon                       => C4::Context->preference("IntranetFavicon"),
+        IntranetUserCSS                       => C4::Context->preference("IntranetUserCSS"),
         IntranetUserJS                        => C4::Context->preference("IntranetUserJS"),
         IndependentBranches                   => C4::Context->preference("IndependentBranches"),
         AutoLocation                          => C4::Context->preference("AutoLocation"),
index 73514c2..3e99a52 100644 (file)
@@ -10,7 +10,6 @@
 <link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
 [% INCLUDE intranetstylesheet.inc %]
 [% IF ( bidi )            %]<link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" />[% END %]
-[% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
 
 <script type="text/javascript" src="[% interface %]/lib/jquery/jquery.js"></script>
 <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui.js"></script>
@@ -23,6 +22,7 @@
 [% IF ( login ) %]
     <link rel="stylesheet" type="text/css" href="[% themelang %]/css/login.css" />
 [% END %]
+[% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
 
 <!-- koha core js -->
 <script type="text/javascript" src="[% themelang %]/js/staff-global.js"></script>