Bugzilla – Attachment 42130 Details for
Bug 14764
Add OPAC News branch selector
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14764: OPAC news selector - Template tags
Bug-14764-OPAC-news-selector---Template-tags.patch (text/plain), 1.85 KB, created by
Martin Persson
on 2015-08-31 23:34:40 UTC
(
hide
)
Description:
Bug 14764: OPAC news selector - Template tags
Filename:
MIME Type:
Creator:
Martin Persson
Created:
2015-08-31 23:34:40 UTC
Size:
1.85 KB
patch
obsolete
>From b085391da68062d1cdb9e48c9dba19a8abdf71f1 Mon Sep 17 00:00:00 2001 >From: Martin Persson <xarragon@gmail.com> >Date: Tue, 1 Sep 2015 00:07:59 +0200 >Subject: [PATCH] Bug 14764: OPAC news selector - Template tags > >Adds tags to the template files to inject branch list. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 7 +++++++ > opac/opac-main.pl | 2 ++ > 2 files changed, 9 insertions(+) > >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 a8bd6f8..f054091 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -24,6 +24,13 @@ > [% END %] > > <div class="row-fluid"> >+ [% IF Koha.Preference( 'opacnewsbranch' ) == 1 %] >+ <ul> >+ [% FOREACH branch IN branches %] >+ <li><a href="?branch=[% branch.branchcode %]">[% branch.branchname %]</a></li> >+ [% END %] >+ </ul> >+ [% END %] > [% IF ( OpacNav || OpacNavBottom ) %] > <div class="span2"> > <div id="navigation"> >diff --git a/opac/opac-main.pl b/opac/opac-main.pl >index 02d4de2..480ea9f 100755 >--- a/opac/opac-main.pl >+++ b/opac/opac-main.pl >@@ -25,6 +25,7 @@ use C4::Output; > use C4::NewsChannels; # GetNewsToDisplay > use C4::Languages qw(getTranslatedLanguages accept_language); > use C4::Koha qw( GetDailyQuote ); >+use C4::Branch qw( GetBranchesLoop ); > > my $input = new CGI; > my $dbh = C4::Context->dbh; >@@ -64,6 +65,7 @@ $template->param( > koha_news_count => $koha_news_count, > display_daily_quote => C4::Context->preference('QuoteOfTheDay'), > daily_quote => $quote, >+ branches => &GetBranchesLoop($homebranch), > ); > > # If GoogleIndicTransliteration system preference is On Set paramter to load Google's javascript in OPAC search screens >-- >2.1.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 14764
:
42129
|
42130
|
42131
|
42132
|
42139
|
42146
|
42147
|
55679
|
55680
|
55681
|
55682
|
55724
|
55725
|
55726
|
56107
|
56108
|
56109
|
57058
|
57059
|
57060
|
57061
|
57062
|
57063
|
57110
|
59648
|
59653
|
59827
|
60396
|
60424
|
60425
|
60451
|
60452