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

(-)a/C4/NewsChannels.pm (-2 / +2 lines)
Lines 207-213 sub GetNewsToDisplay { Link Here
207
     FROM opac_news
207
     FROM opac_news
208
     LEFT JOIN borrowers on borrowers.borrowernumber =
208
     LEFT JOIN borrowers on borrowers.borrowernumber =
209
         opac_news.borrowernumber
209
         opac_news.borrowernumber
210
     WHERE (};
210
     WHERE };
211
211
212
    if ( defined $id ) {
212
    if ( defined $id ) {
213
        $query .= q{ opac_news.idnew = ? } if defined $id;
213
        $query .= q{ opac_news.idnew = ? } if defined $id;
Lines 216-222 sub GetNewsToDisplay { Link Here
216
216
217
    unless ( defined $time ) {
217
    unless ( defined $time ) {
218
        $query .= q{ AND } if defined $id;
218
        $query .= q{ AND } if defined $id;
219
        $query .= q{
219
        $query .= q{ (
220
            expirationdate >= CURRENT_DATE()
220
            expirationdate >= CURRENT_DATE()
221
            OR    expirationdate IS NULL
221
            OR    expirationdate IS NULL
222
            OR    expirationdate = '00-00-0000'
222
            OR    expirationdate = '00-00-0000'
(-)a/installer/data/mysql/atomicupdate/bug-14272-change-column-name-in-opac-news.sql (+1 lines)
Line 0 Link Here
1
ALTER TABLE opac_news CHANGE COLUMN `new` `content` text NOT NULL;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +1 lines)
Lines 183-189 Link Here
183
            [% SET newsdisp = Koha.Preference('NewsAuthorDisplay') %]
183
            [% SET newsdisp = Koha.Preference('NewsAuthorDisplay') %]
184
            [% FOREACH koha_new IN koha_news %]
184
            [% FOREACH koha_new IN koha_news %]
185
                <div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
185
                <div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
186
                    <div class="newsbody">[% koha_new.new %]</div>
186
                    <div class="newsbody">[% koha_new.content %]</div>
187
                    <p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %]
187
                    <p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %]
188
                        [% IF ( CAN_user_tools ) %]
188
                        [% IF ( CAN_user_tools ) %]
189
                            <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
189
                            <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt (-2 / +2 lines)
Lines 162-168 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
162
                [% END %]
162
                [% END %]
163
            </li>
163
            </li>
164
            <li><label for="new">News: </label>
164
            <li><label for="new">News: </label>
165
            <textarea name="new" id="new"  cols="75" rows="10">[% new_detail.new %]</textarea>
165
            <textarea name="new" id="new"  cols="75" rows="10">[% new_detail.content %]</textarea>
166
            </li>
166
            </li>
167
            </ol>
167
            </ol>
168
			</fieldset>
168
			</fieldset>
Lines 254-260 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
254
                            <td>[% opac_new.title %]</td>
254
                            <td>[% opac_new.title %]</td>
255
                            <td>[% opac_new.author_title %] [% opac_new.author_firstname %] [% opac_new.author_surname %]</td>
255
                            <td>[% opac_new.author_title %] [% opac_new.author_firstname %] [% opac_new.author_surname %]</td>
256
                           <td>
256
                           <td>
257
                                [% opac_new.new %]
257
                                [% opac_new.content %]
258
                            </td>
258
                            </td>
259
                            <td class="actions">
259
                            <td class="actions">
260
                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% opac_new.idnew %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
260
                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% opac_new.idnew %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-2 / +1 lines)
Lines 53-59 Link Here
53
                [% FOREACH koha_new IN koha_news %]
53
                [% FOREACH koha_new IN koha_news %]
54
                    <div class="newsitem">
54
                    <div class="newsitem">
55
                        <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>
55
                        <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>
56
                        <div class="newsbody">[% koha_new.new %]</div>
56
                        <div class="newsbody">[% koha_new.content %]</div>
57
                        <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>
57
                        <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>
58
                    </div>
58
                    </div>
59
                [% END %]
59
                [% END %]
60
- 

Return to bug 14272