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

(-)a/C4/NewsChannels.pm (-6 / +6 lines)
Lines 71-79 sub add_opac_new { Link Here
71
        $sth->execute(@values);
71
        $sth->execute(@values);
72
        $retval = 1;
72
        $retval = 1;
73
73
74
        #log the NEW OPAC news entry
74
        #Log new news entry
75
        if (C4::Context->preference("NewsLog")) {
75
        if (C4::Context->preference("NewsLog")) {
76
                logaction('OPACNEWS', 'ADD' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
76
                logaction('NEWS', 'ADD' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
77
        }
77
        }
78
    }
78
    }
79
    return $retval;
79
    return $retval;
Lines 116-124 sub upd_opac_new { Link Here
116
        $retval = 1;
116
        $retval = 1;
117
    }
117
    }
118
118
119
    #log new OPAC news modification
119
    #Log news entry modification
120
    if (C4::Context->preference("NewsLog")) {
120
    if (C4::Context->preference("NewsLog")) {
121
            logaction('OPACNEWS', 'MODIFY' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
121
            logaction('NEWS', 'MODIFY' , undef, $href_entry->{lang} . ' | ' . $href_entry->{content});
122
    }
122
    }
123
    return $retval;
123
    return $retval;
124
}
124
}
Lines 127-137 sub del_opac_new { Link Here
127
    my ($ids) = @_;
127
    my ($ids) = @_;
128
    if ($ids) {
128
    if ($ids) {
129
129
130
        #log new OPAC news deletion
130
        #Log news deletion
131
        if (C4::Context->preference("NewsLog")) {
131
        if (C4::Context->preference("NewsLog")) {
132
            foreach my $newsid ( split(/,/, $ids )) {
132
            foreach my $newsid ( split(/,/, $ids )) {
133
                my $n = Koha::News->find( $newsid );
133
                my $n = Koha::News->find( $newsid );
134
                logaction('OPACNEWS', 'DELETE', undef, $n->unblessed->{lang} . ' | ' . $n->unblessed->{content} );
134
                logaction('NEWS', 'DELETE', undef, $n->unblessed->{lang} . ' | ' . $n->unblessed->{content} );
135
            }
135
            }
136
        }
136
        }
137
137
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-3 / +2 lines)
Lines 95-101 Link Here
95
[%        CASE 'SEARCHENGINE' %]Search engine
95
[%        CASE 'SEARCHENGINE' %]Search engine
96
96
97
[%        CASE 'NOTICES'      %]Notices[% UNLESS Koha.Preference('NoticesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
97
[%        CASE 'NOTICES'      %]Notices[% UNLESS Koha.Preference('NoticesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
98
[%        CASE 'OPACNEWS'      %]OPAC news[% UNLESS Koha.Preference('NewsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
98
[%        CASE 'NEWS'      %]News[% UNLESS Koha.Preference('NewsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
99
[%        CASE %][% module | html %]
99
[%        CASE %][% module | html %]
100
[%    END %]
100
[%    END %]
101
[% END %]
101
[% END %]
Lines 201-207 Link Here
201
                                        [% ELSE %]
201
                                        [% ELSE %]
202
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
202
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
203
                                        [% END %]
203
                                        [% END %]
204
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES', 'OPACNEWS' ] %]
204
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES', 'NEWS' ] %]
205
                                            [% IF modules.grep(modx).size %]
205
                                            [% IF modules.grep(modx).size %]
206
                                                <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
206
                                                <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
207
                                            [% ELSE %]
207
                                            [% ELSE %]
208
- 

Return to bug 26205