Bugzilla – Attachment 36656 Details for
Bug 7843
Add RSS feeds for OPAC news
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7843 [QA Followup] - Make news selection persistant
Bug-7843-QA-Followup---Make-news-selection-persist.patch (text/plain), 2.79 KB, created by
Kyle M Hall (khall)
on 2015-03-06 09:54:26 UTC
(
hide
)
Description:
Bug 7843 [QA Followup] - Make news selection persistant
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-03-06 09:54:26 UTC
Size:
2.79 KB
patch
obsolete
>From dd4beb8808f3da28ec0f7c7562f1c8bb3dd0fa21 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 6 Mar 2015 10:37:04 +0100 >Subject: [PATCH] Bug 7843 [QA Followup] - Make news selection persistant > >This patch makes the following changes: >1) If there is no logged in patron, the RSS link states it is for > system-wide news. >2) If a patron is logged in, the RSS link states it is for system-wide > news *and* news for the patron's home library. >3) The patron's home branch code is embedded in the RSS feed url so > he or she no longer needs to be logged in for us to know what branch's > news to pull. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 6 ++++-- > opac/opac-news-rss.pl | 7 ++----- > 2 files changed, 6 insertions(+), 7 deletions(-) > >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 41eac01..e977d27 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -1,4 +1,5 @@ > [% USE Koha %] >+[% USE Branches %] > [% INCLUDE 'doc-head-open.inc' %] > [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog > [% INCLUDE 'doc-head-close.inc' %] >@@ -48,8 +49,9 @@ > [% END %] > </div> > <div id="rssnews-container"> >- <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-news-rss.pl"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png"></a> >- RSS for Library News. >+ [% SET branchcode = Branches.GetLoggedInBranchcode() %] >+ <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode %]"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png"></a> >+ RSS feed for [% IF ( loggedinusername ) %][% Branches.GetName( branchcode ) %] <i>and</i> [% END %] system-wide library news. > </div> > [% END %] > >diff --git a/opac/opac-news-rss.pl b/opac/opac-news-rss.pl >index d48fceb..7b1fe9b 100755 >--- a/opac/opac-news-rss.pl >+++ b/opac/opac-news-rss.pl >@@ -42,12 +42,9 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > # use cookie setting for language, bug default to syspref if it's not set > my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input); > >-my $homebranch; >+my $branchcode = $input->param('branchcode'); > >-if (C4::Context->userenv) { >- $homebranch = C4::Context->userenv->{'branch'}; >-} >-my $all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); >+my $all_koha_news = GetNewsToDisplay( $news_lang, $branchcode ); > my $koha_news_count = scalar @$all_koha_news; > > $template->param( >-- >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 7843
:
28926
|
35733
|
36017
|
36023
|
36024
|
36025
|
36390
|
36403
|
36414
|
36415
|
36416
|
36417
|
36418
|
36651
|
36652
|
36653
|
36654
|
36655
| 36656