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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-1 / +1 lines)
Lines 362-368 Link Here
362
                                        [% IF ( loopro.module == 'CIRCULATION' ) %]
362
                                        [% IF ( loopro.module == 'CIRCULATION' ) %]
363
                                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.info | uri %]&amp;biblionumber=[% loopro.biblionumber | uri %]&amp;bi=[% loopro.biblioitemnumber | uri %]#item[% loopro.info | uri %]" title="Display detail for this item">Item [% loopro.barcode | html %]</a>
363
                                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.info | uri %]&amp;biblionumber=[% loopro.biblionumber | uri %]&amp;bi=[% loopro.biblioitemnumber | uri %]#item[% loopro.info | uri %]" title="Display detail for this item">Item [% loopro.barcode | html %]</a>
364
                                        [% ELSE %]
364
                                        [% ELSE %]
365
                                            [% IF loopro.module == "SYSTEMPREFERENCE" || loopro.module == "REPORTS" || loopro.module == "OPACNEWS" %]
365
                                            [% IF loopro.module == "SYSTEMPREFERENCE" || loopro.module == "REPORTS" || loopro.module == "NEWS" %]
366
                                                <div class="loginfo" id="loginfo[% loopro.action_id | html %]">[% loopro.info | trim | html %]</div>
366
                                                <div class="loginfo" id="loginfo[% loopro.action_id | html %]">[% loopro.info | trim | html %]</div>
367
                                                <div class="compare_info" id="compare_info[% loopro.action_id | html %]">
367
                                                <div class="compare_info" id="compare_info[% loopro.action_id | html %]">
368
                                                    <label><input type="checkbox" name="diff" id="action_id[% loopro.action_id | html %]" data-actionid="[% loopro.action_id | html %]" data-filter="[% FOREACH info IN loopro.info.split(' \| ') %][% IF loop.first %][% info | html %][% END %][% END %]" class="compare" /> Compare</label>
368
                                                    <label><input type="checkbox" name="diff" id="action_id[% loopro.action_id | html %]" data-actionid="[% loopro.action_id | html %]" data-filter="[% FOREACH info IN loopro.info.split(' \| ') %][% IF loop.first %][% info | html %][% END %][% END %]" class="compare" /> Compare</label>
(-)a/tools/koha-news.pl (-1 / +16 lines)
Lines 30-35 use C4::Output qw( output_html_with_http_headers ); Link Here
30
use C4::Languages qw( getTranslatedLanguages );
30
use C4::Languages qw( getTranslatedLanguages );
31
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::News;
32
use Koha::News;
33
use C4::Log qw(logaction);
33
34
34
my $cgi = CGI->new;
35
my $cgi = CGI->new;
35
36
Lines 115-120 elsif ( $op eq 'add' ) { Link Here
115
            branchcode     => $branchcode,
116
            branchcode     => $branchcode,
116
            borrowernumber => $borrowernumber,
117
            borrowernumber => $borrowernumber,
117
        })->store;
118
        })->store;
119
        #log news addition
120
        if (C4::Context->preference("NewsLog")) {
121
            logaction('NEWS', 'ADD' , undef, $lang . ' | ' . $content);
122
        }
118
        print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
123
        print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
119
    }
124
    }
120
    else {
125
    else {
Lines 134-143 elsif ( $op eq 'edit' ) { Link Here
134
            branchcode     => $branchcode,
139
            branchcode     => $branchcode,
135
        })->store;
140
        })->store;
136
    }
141
    }
142
    #log news modification
143
    if (C4::Context->preference("NewsLog")) {
144
        logaction('NEWS', 'MODIFY' , undef, $lang . ' | ' . $content);
145
    }
137
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
146
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
138
}
147
}
139
elsif ( $op eq 'del' ) {
148
elsif ( $op eq 'del' ) {
140
    my @ids = $cgi->multi_param('ids');
149
    my @ids = $cgi->multi_param('ids');
150
    #log news deletion then delete it
151
    if (C4::Context->preference("NewsLog")) {
152
        foreach my $newsid ( @ids ) {
153
            my $n = Koha::News->find( $newsid );
154
            logaction('NEWS', 'DELETE', undef, $n->lang . ' | ' . $n->content );
155
        }
156
    }
141
    Koha::News->search({ idnew => \@ids })->delete;
157
    Koha::News->search({ idnew => \@ids })->delete;
142
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
158
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
143
}
159
}
144
- 

Return to bug 28717