View | Details | Raw Unified | Return to bug 7843
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-2 / +4 lines)
Lines 1-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 48-55 Link Here
48
                [% END %]
49
                [% END %]
49
            </div>
50
            </div>
50
            <div id="rssnews-container">
51
            <div id="rssnews-container">
51
                <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-news-rss.pl"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png"></a>
52
                [% SET branchcode = Branches.GetLoggedInBranchcode() %]
52
                RSS for Library News.
53
                <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode %]"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png"></a>
54
                RSS feed for [% IF ( loggedinusername ) %][% Branches.GetName( branchcode ) %] <i>and</i> [% END %] system-wide library news.
53
            </div>
55
            </div>
54
        [% END %]
56
        [% END %]
55
57
(-)a/opac/opac-news-rss.pl (-6 / +2 lines)
Lines 42-53 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
42
# use cookie setting for language, bug default to syspref if it's not set
42
# use cookie setting for language, bug default to syspref if it's not set
43
my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input);
43
my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input);
44
44
45
my $homebranch;
45
my $branchcode = $input->param('branchcode');
46
46
47
if (C4::Context->userenv) {
47
my $all_koha_news   = GetNewsToDisplay( $news_lang, $branchcode );
48
    $homebranch = C4::Context->userenv->{'branch'};
49
}
50
my $all_koha_news   = &GetNewsToDisplay($news_lang,$homebranch);
51
my $koha_news_count = scalar @$all_koha_news;
48
my $koha_news_count = scalar @$all_koha_news;
52
49
53
$template->param(
50
$template->param(
54
- 

Return to bug 7843