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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-3 / +12 lines)
Lines 11-17 Link Here
11
11
12
<div class="main">
12
<div class="main">
13
    <ul class="breadcrumb">
13
    <ul class="breadcrumb">
14
        <li><a href="#">Home</a></li>
14
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a>
15
        [% IF ( news_type ) %]
16
            <span class="divider">&rsaquo;</span></li>
17
            <li><a href="#">
18
            [% SWITCH news_type    %]
19
                [% CASE 'news_item'    %]News item
20
            [% END %]
21
            </a>
22
        [% END %]
23
        </li>
15
    </ul>
24
    </ul>
16
25
17
    [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
26
    [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
Lines 58-65 Link Here
58
                [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %]
67
                [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %]
59
                [% FOREACH koha_new IN koha_news %]
68
                [% FOREACH koha_new IN koha_news %]
60
                    <div class="newsitem">
69
                    <div class="newsitem">
61
                        <a name="newsitem[% koha_new.idnew %]"></a><h4 class="newsheader">[% koha_new.title %]</h4>
70
                        <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>
62
                        <div class="newsbody">[% koha_new.content %]</div>
71
                        <div class="newsbody">[% koha_new.new %]</div>
63
                        <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>
72
                        <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>
64
                    </div>
73
                    </div>
65
                [% END %]
74
                [% END %]
(-)a/opac/opac-main.pl (-3 / +12 lines)
Lines 61-68 if (defined $input->param('branch') and length $input->param('branch')) { Link Here
61
elsif (C4::Context->userenv and defined $input->param('branch') and length $input->param('branch') == 0 ){
61
elsif (C4::Context->userenv and defined $input->param('branch') and length $input->param('branch') == 0 ){
62
   $homebranch = "";
62
   $homebranch = "";
63
}
63
}
64
my $all_koha_news   = &GetNewsToDisplay($news_lang,$homebranch);
64
65
my $koha_news_count = scalar @$all_koha_news;
65
my $news_id = $input->param('news_id');
66
my ($all_koha_news, $koha_news_count, $news_type);
67
if (defined $news_id && length $news_id) {
68
    $all_koha_news = &GetNewsToDisplay($news_lang, $homebranch, undef, $news_id);
69
    $koha_news_count = 1;
70
    $news_type = 'news_item';
71
} else {
72
    $all_koha_news = &GetNewsToDisplay($news_lang, $homebranch);
73
    $koha_news_count = scalar @$all_koha_news;
74
}
66
75
67
my $quote = GetDailyQuote();   # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha
76
my $quote = GetDailyQuote();   # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha
68
77
Lines 93-98 $template->param( Link Here
93
    koha_news           => $all_koha_news,
102
    koha_news           => $all_koha_news,
94
    koha_news_count     => $koha_news_count,
103
    koha_news_count     => $koha_news_count,
95
    branchcode          => $homebranch,
104
    branchcode          => $homebranch,
105
    news_type           => $news_type,
96
    display_daily_quote => C4::Context->preference('QuoteOfTheDay'),
106
    display_daily_quote => C4::Context->preference('QuoteOfTheDay'),
97
    daily_quote         => $quote,
107
    daily_quote         => $quote,
98
);
108
);
99
- 

Return to bug 14272