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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-30 / +1 lines)
Lines 89-122 Link Here
89
        [% END %]
89
        [% END %]
90
90
91
        [% IF koha_news.count %]
91
        [% IF koha_news.count %]
92
            [% SET koha_news = AdditionalContents.get( category => 'news', location => ['opac_only', 'staff_and_opac'], lang => lang, news_id => news_id ) %]
93
        [% ELSE %]
94
            [% SET koha_news = AdditionalContents.get( category => 'news', location => ['opac_only', 'staff_and_opac'], lang => lang, library => branchcode ) %]
95
        [% END %]
96
        [% IF koha_news.content.count %]
97
            <div id="news" class="newscontainer">
98
                [% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'opac' || Koha.Preference('NewsAuthorDisplay') == 'both' %]
99
                [% FOREACH koha_new IN koha_news.content %]
100
                    <div class="newsitem">
101
                        <h4 class="newsheader">
102
                            [% IF ( news_item ) %]
103
                                [% koha_new.title | html %]
104
                            [% ELSE %]
105
                                <a id="newsitem[% koha_new.id | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.id | uri %]">[% koha_new.title | html %]</a>
106
                            [% END %]
107
                        </h4>
108
                        <div class="newsbody">[% koha_new.content | $raw %]</div>
109
                        <div class="newsfooter">
110
                            Published on [% koha_new.published_on | $KohaDates %]
111
                            [% IF ( show_author && koha_new.author ) %]
112
                                by <span class="newsauthor">[% INCLUDE 'patron-title.inc' patron=koha_new.author %]</span>
113
                            [% END %]
114
                            [% IF ( news_id ) %]
115
                                &bull; <a href="/cgi-bin/koha/opac-main.pl">Show all news</a>
116
                            [% END %]
117
                        </div>
118
                    </div>
119
                [% END %]
120
92
121
            [% IF single_news_error %]
93
            [% IF single_news_error %]
122
94
Lines 135-141 Link Here
135
                                [% IF ( news_item ) %]
107
                                [% IF ( news_item ) %]
136
                                    [% koha_new.title | html %]
108
                                    [% koha_new.title | html %]
137
                                [% ELSE %]
109
                                [% ELSE %]
138
                                    <a name="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew | uri %]">[% koha_new.title | html %]</a>
110
                                    <a id="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew | uri %]">[% koha_new.title | html %]</a>
139
                                [% END %]
111
                                [% END %]
140
                            </h4>
112
                            </h4>
141
                            <div class="newsbody">[% koha_new.content | $raw %]</div>
113
                            <div class="newsbody">[% koha_new.content | $raw %]</div>
142
- 

Return to bug 36359