Bugzilla – Attachment 92594 Details for
Bug 22880
Convert opacheader system preference to news block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22880: (follow-up) Define OpacHeader variable for conditional
Bug-22880-follow-up-Define-OpacHeader-variable-for.patch (text/plain), 2.21 KB, created by
Owen Leonard
on 2019-09-04 17:51:03 UTC
(
hide
)
Description:
Bug 22880: (follow-up) Define OpacHeader variable for conditional
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-09-04 17:51:03 UTC
Size:
2.21 KB
patch
obsolete
>From 3e78c4a8df73e7197187fb276d5b4fac40f11c34 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 4 Sep 2019 17:42:02 +0000 >Subject: [PATCH] Bug 22880: (follow-up) Define OpacHeader variable for > conditional > >This follow-up uses the updates introduced by Bug 23253 as a model for >improving the display of opacheader. Adding the OpacHeader variable >allows the template to check for its existence and display some >container markup around opacheader if it exists. This will help ease the >transition for libraries who depend on the #opacheader id for styling. > >To test, apply the patch and test the OPAC with an 'opacheader' item >defined. The content should be displayed on the page inside '<div >id="opacheader"></div>.' > >Delete the 'opacheader' news item and reload the OPAC page. There should >no longer be an #opacheader div. >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 4cbffbf7852..a1bf382da11 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -4,6 +4,7 @@ > [% USE Categories %] > [% USE KohaNews %] > [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] >+[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => news_lang, library => branchcode, blocktitle => 0 ) %] > <div id="wrap"> > <div id="header-region" class="noprint"> > <div class="navbar navbar-inverse navbar-static-top"> >@@ -123,7 +124,15 @@ > </div> <!-- /navbar-inner --> > </div> <!-- /navbar --> > >- [% PROCESS koha_news_block news => KohaNews.get( location => "opacheader", lang => news_lang, library => branchcode, blocktitle => 0 ) %] >+ [% IF ( OpacHeader ) %] >+ <div class="container-fluid"> >+ <div class="row-fluid"> >+ <div id="opacheader"> >+ [% PROCESS koha_news_block news => OpacHeader %] >+ </div> >+ </div> >+ </div> >+ [% END %] > > </div> <!-- / header-region --> > >-- >2.11.0
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 22880
:
89517
|
90495
|
92207
|
92208
|
92592
|
92593
|
92594
|
92600
|
92601
|
92602
|
96209
|
96210
|
96219
|
98773
|
98775
|
98985
|
98986
|
98987
|
98988
|
98989
|
99362
|
99363
|
99364
|
99365
|
99366
|
99367
|
99490
|
99491
|
99492
|
99493
|
99494
|
99495
|
99496
|
99497
|
99498