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. Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
12074faff9
commit
ba0eccdf8d
|
|
@ -4,7 +4,7 @@
|
|||
[% USE Categories %]
|
||||
[% USE KohaNews %]
|
||||
[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
|
||||
[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => lang, library => branchcode, blocktitle => 0 ) %]
|
||||
[% 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">
|
||||
|
|
@ -145,7 +145,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 -->
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue