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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (+30 lines)
Lines 50-55 Link Here
50
[%    END %]
50
[%    END %]
51
[% END %]
51
[% END %]
52
52
53
[% BLOCK translate_log_interface %]
54
[%    SWITCH interface %]
55
[%        CASE 'INTRANET'    %]Intranet
56
[%        CASE 'OPAC'        %]OPAC
57
[%        CASE 'SIP'         %]SIP
58
[%        CASE 'COMMANDLINE' %]Command-line
59
[%        CASE %][% interface %]
60
[%    END %]
61
[% END %]
62
53
<div id="breadcrumbs">
63
<div id="breadcrumbs">
54
	<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
64
	<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
55
	[% IF ( do_it ) %]
65
	[% IF ( do_it ) %]
Lines 119-124 Link Here
119
								<label for="info">Info:</label>
129
								<label for="info">Info:</label>
120
								<input type="text" id="info" name="info" value="[% info %]" />
130
								<input type="text" id="info" name="info" value="[% info %]" />
121
							</li>
131
							</li>
132
                            <li>
133
                                <label for="interfaces">Interface:</label>
134
                                <select name="interfaces" id="interfaces" multiple="multiple">
135
                                    [% UNLESS interfaces %]
136
                                        <option value="" selected="selected">All</option>
137
                                    [% ELSE %]
138
                                        <option value="">All</option>
139
                                    [% END %]
140
141
                                    [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
142
                                        [% IF interfaces.grep(interf).size %]
143
                                            <option value="[% interf %]" selected="selected">[% PROCESS translate_log_interface interface=interf %]</option>
144
                                        [% ELSE %]
145
                                            <option value="[% interf %]">[% PROCESS translate_log_interface interface=interf %]</option>
146
                                        [% END %]
147
                                    [% END %]
148
                                </select>
149
                            </li>
122
							<li>
150
							<li>
123
                                <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" class="datepickerfrom" />
151
                                <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" class="datepickerfrom" />
124
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
152
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
Lines 167-172 Link Here
167
                                    <th>Action</th>
195
                                    <th>Action</th>
168
                                    <th>Object</th>
196
                                    <th>Object</th>
169
                                    <th>Info</th>
197
                                    <th>Info</th>
198
                                    <th>Interface</th>
170
                                </tr>
199
                                </tr>
171
                            </thead>
200
                            </thead>
172
                            <tbody>
201
                            <tbody>
Lines 210-215 Link Here
210
                                            [% loopro.info |html %]
239
                                            [% loopro.info |html %]
211
                                        [% END %]
240
                                        [% END %]
212
                                    </td>
241
                                    </td>
242
                                    <td>[% PROCESS translate_log_interface interface=loopro.interface %]</td>
213
                                </tr>
243
                                </tr>
214
                            [% END %]
244
                            [% END %]
215
                            </tbody>
245
                            </tbody>
(-)a/tools/viewlog.pl (-3 / +5 lines)
Lines 48-53 my $do_it = $input->param('do_it'); Link Here
48
my @modules  = $input->multi_param("modules");
48
my @modules  = $input->multi_param("modules");
49
my $user     = $input->param("user") // '';
49
my $user     = $input->param("user") // '';
50
my @actions  = $input->multi_param("actions");
50
my @actions  = $input->multi_param("actions");
51
my @interfaces  = $input->multi_param("interfaces");
51
my $object   = $input->param("object");
52
my $object   = $input->param("object");
52
my $info     = $input->param("info");
53
my $info     = $input->param("info");
53
my $datefrom = $input->param("from");
54
my $datefrom = $input->param("from");
Lines 105-114 $template->param( Link Here
105
if ($do_it) {
106
if ($do_it) {
106
107
107
    my @data;
108
    my @data;
108
    my ( $results, $modules, $actions );
109
    my ( $results, $modules, $actions, $interfaces );
109
    if ( defined $actions[0] && $actions[0] ne '' ) { $actions  = \@actions; }     # match All means no limit
110
    if ( defined $actions[0] && $actions[0] ne '' ) { $actions  = \@actions; }     # match All means no limit
110
    if ( $modules[0] ne '' ) { $modules = \@modules; }    # match All means no limit
111
    if ( $modules[0] ne '' ) { $modules = \@modules; }    # match All means no limit
111
    $results = GetLogs( $datefrom, $dateto, $user, $modules, $actions, $object, $info );
112
    if ( defined $interfaces[0] && $interfaces[0] ne '' ) { $interfaces = \@interfaces; }    # match All means no limit
113
    $results = GetLogs( $datefrom, $dateto, $user, $modules, $actions, $object, $info, $interfaces );
112
    @data = @$results;
114
    @data = @$results;
113
    foreach my $result (@data) {
115
    foreach my $result (@data) {
114
116
Lines 170-175 if ($do_it) { Link Here
170
            src      => $src,
172
            src      => $src,
171
            modules  => \@modules,
173
            modules  => \@modules,
172
            actions  => \@actions,
174
            actions  => \@actions,
175
            interfaces => \@interfaces
173
        );
176
        );
174
177
175
        # Used modules
178
        # Used modules
176
- 

Return to bug 16829