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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-1 / +1 lines)
Lines 43-49 Link Here
43
                [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %]
43
                [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %]
44
                [% FOREACH koha_new IN koha_news %]
44
                [% FOREACH koha_new IN koha_news %]
45
                    <div class="newsitem">
45
                    <div class="newsitem">
46
                        <a name="newsitem[% koha_new.idnew %]"></a><h4 class="newsheader">[% koha_new.title %]</h4>
46
                        <a name="newsitem[% koha_new.idnew %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew%]"><h4 class="newsheader">[% koha_new.title %]</h4></a>
47
                        <div class="newsbody">[% koha_new.new %]</div>
47
                        <div class="newsbody">[% koha_new.new %]</div>
48
                        <div class="newsfooter">(published on [% koha_new.newdate %][% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %][% END %])</div>
48
                        <div class="newsfooter">(published on [% koha_new.newdate %][% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %][% END %])</div>
49
                    </div>
49
                    </div>
(-)a/opac/opac-main.pl (-3 / +10 lines)
Lines 51-58 my $homebranch; Link Here
51
if (C4::Context->userenv) {
51
if (C4::Context->userenv) {
52
    $homebranch = C4::Context->userenv->{'branch'};
52
    $homebranch = C4::Context->userenv->{'branch'};
53
}
53
}
54
my $all_koha_news   = &GetNewsToDisplay($news_lang,$homebranch);
54
55
my $koha_news_count = scalar @$all_koha_news;
55
my $news_id = $input->param('news_news_id');
56
my ($all_koha_news, $koha_news_count);
57
if (defined $news_id && length $news_id) {
58
    $all_koha_news = [ get_opac_new($news_id) ];
59
    $koha_news_count = 1;
60
} else {
61
    $all_koha_news = GetNewsToDisplay($news_lang, $homebranch);
62
    $koha_news_count = scalar @$all_koha_news;
63
}
56
64
57
my $quote = GetDailyQuote();   # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha
65
my $quote = GetDailyQuote();   # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha
58
66
59
- 

Return to bug 14272