Bugzilla – Attachment 30607 Details for
Bug 12162
Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
Bug-12162---Add-classbranchcode-to-body-tag-to-mak.patch (text/plain), 2.85 KB, created by
Marc Véron
on 2014-08-07 23:15:06 UTC
(
hide
)
Description:
Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-08-07 23:15:06 UTC
Size:
2.85 KB
patch
obsolete
>From 1f985afd79eb4e2e567714c270b924ad832ebe11 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 25 Jul 2014 23:57:54 +0200 >Subject: [PATCH] Bug 12162 - Add class="branchcode" to body tag to make OPAC > CSS-styleable per branch > >This patch is still a proof of concept for testing. I followed paxed's hints. > >New: Include file for the head tag. >It can handle different situations (head width additional class like scrollto, head wit and without id). > >For the test, the include is inserted in opac-main.tt and opac-user.tt > >If not logged in, opac-main.pl displays: ><body ID="opac-main" class="branch-default" > >If logged in at branch FFL, it displays: ><body ID="opac-main" class="branch-FFL" > > >If you log in, opac-user.pl should display ><body ID="opac-user" class="branch-FFL scrollto" > > >Comments are welcome... >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc | 15 +++++++++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 2 +- > 3 files changed, 17 insertions(+), 2 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc >new file mode 100644 >index 0000000..487d7e9 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc >@@ -0,0 +1,15 @@ >+[% classprop = 'class="' %] >+[% IF LoginBranchcode.defined %] >+ [% classprop = classprop _ 'branch-' _ LoginBranchcode %] >+[% ELSE %] >+ [% classprop = classprop _ 'branch-default' %] >+[% END %] >+[% IF bodyclass.defined %] >+ [% classprop = classprop _ ' ' _ bodyclass %] >+[% END %] >+[% classprop = classprop _ '"' %] >+ >+[% IF bodyid.defined %] >+ [% idprop = 'ID="' _ bodyid _ '" ' %] >+[% END %] >+<body [%idprop%][% classprop %] > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index 5b68c19..7c0e1ab 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -4,7 +4,7 @@ > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > </head> >-<body id="opac-main"> >+[% INCLUDE 'bodytag.inc' bodyid='opac-main' %] > [% INCLUDE 'masthead.inc' %] > > <div class="main"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 16783a7..5414860 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -6,7 +6,7 @@ > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > </head> >-<body id="opac-user" class="scrollto"> >+[% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %] > [% INCLUDE 'masthead.inc' %] > > <div class="main"> >-- >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 12162
:
27784
|
27811
|
30319
|
30536
|
30537
|
30606
|
30607
|
30770
|
31803
|
31807