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 (-2 / +16 lines)
Lines 32-37 use C4::Languages qw(getTranslatedLanguages); Link Here
32
use Date::Calc qw/Date_to_Days Today/;
32
use Date::Calc qw/Date_to_Days Today/;
33
use Koha::DateUtils;
33
use Koha::DateUtils;
34
use Koha::News;
34
use Koha::News;
35
use C4::Log qw(logaction);
35
36
36
my $cgi = CGI->new;
37
my $cgi = CGI->new;
37
38
Lines 117-122 elsif ( $op eq 'add' ) { Link Here
117
            branchcode     => $branchcode,
118
            branchcode     => $branchcode,
118
            borrowernumber => $borrowernumber,
119
            borrowernumber => $borrowernumber,
119
        })->store;
120
        })->store;
121
        #log news addition
122
        if (C4::Context->preference("NewsLog")) {
123
            logaction('NEWS', 'ADD' , undef, $lang . ' | ' . $content);
124
        }
120
        print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
125
        print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
121
    }
126
    }
122
    else {
127
    else {
Lines 136-146 elsif ( $op eq 'edit' ) { Link Here
136
            branchcode     => $branchcode,
141
            branchcode     => $branchcode,
137
        })->store;
142
        })->store;
138
    }
143
    }
144
    #log news modification
145
    if (C4::Context->preference("NewsLog")) {
146
        logaction('NEWS', 'MODIFY' , undef, $lang . ' | ' . $content);
147
    }
139
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
148
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
140
}
149
}
141
elsif ( $op eq 'del' ) {
150
elsif ( $op eq 'del' ) {
142
    my @ids = $cgi->multi_param('ids');
151
    my @ids = $cgi->multi_param('ids');
143
    Koha::News->search({ idnew => \@ids })->delete;
152
    Koha::News->search({ idnew => @ids })->delete;
153
    #log news deletion
154
    if (C4::Context->preference("NewsLog")) {
155
        foreach my $newsid ( @ids ) {
156
            logaction('NEWS', 'DELETE', undef, $newsid );
157
        }
158
    }
144
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
159
    print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
145
}
160
}
146
161
147
- 

Return to bug 28717