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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-18 / +35 lines)
Lines 67-90 Link Here
67
								<label for="user">Librarian:</label>
67
								<label for="user">Librarian:</label>
68
								<input type="text" name="user" id="user" value="[% user %]" />
68
								<input type="text" name="user" id="user" value="[% user %]" />
69
							</li>
69
							</li>
70
							<li>
70
                        <li>
71
								<label for="modules">Module:</label>
71
                                <label for="modules">Modules:</label>
72
								<select name="modules" id="modules" multiple="multiple">
72
                                <select name="modules" id="modules" multiple="multiple">
73
									<option value="" selected="selected">All</option>
73
                                    [% UNLESS modules %]
74
                                                                        [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' ] %]
74
                                        <option value="" selected="selected">All</option>
75
                                                                        <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option>
75
                                    [% ELSE %]
76
                                                                        [% END %]
76
                                        <option value="">All</option>
77
								</select>
77
                                    [% END %]
78
							</li>
78
                                    [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' ] %]
79
							<li>
79
                                        [% IF modules.grep(modx).size %]
80
								<label for="action">Action:</label>
80
                                            <option value="[% modx %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
81
								<select name="action" id="action">
81
                                        [% ELSE %]
82
									<option value ="">All</option>
82
                                            <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option>
83
                                                                        [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'CREATE' ] %]
83
                                        [% END %]
84
                                                                        <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option>
84
                                    [% END %]
85
                                                                        [% END %]
85
                                </select>
86
								</select>
86
                            </li>
87
							</li>
87
                            <li>
88
                                <label for="actions">Actions:</label>
89
                                <select name="actions" id="actions" multiple="multiple">
90
                                    [% UNLESS actions %]
91
                                        <option value="" selected="selected">All</option>
92
                                    [% ELSE %]
93
                                        <option value="">All</option>
94
                                    [% END %]
95
96
                                    [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'CREATE' ] %]
97
                                        [% IF actions.grep(actx).size %]
98
                                            <option value="[% actx %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
99
                                        [% ELSE %]
100
                                                <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option>
101
                                        [% END %]
102
                                    [% END %]
103
                                </select>
104
                            </li>
88
							<li>
105
							<li>
89
								<label for="object">Object: </label>
106
								<label for="object">Object: </label>
90
								<input type="text" id="object" name="object" value="[% object %]" />
107
								<input type="text" id="object" name="object" value="[% object %]" />
(-)a/tools/viewlog.pl (-11 / +6 lines)
Lines 47-53 $debug or $debug = $cgi_debug; Link Here
47
my $do_it    = $input->param('do_it');
47
my $do_it    = $input->param('do_it');
48
my @modules  = $input->param("modules");
48
my @modules  = $input->param("modules");
49
my $user     = $input->param("user");
49
my $user     = $input->param("user");
50
my @action   = $input->param("action");
50
my @actions  = $input->param("actions");
51
my $object   = $input->param("object");
51
my $object   = $input->param("object");
52
my $info     = $input->param("info");
52
my $info     = $input->param("info");
53
my $datefrom = $input->param("from");
53
my $datefrom = $input->param("from");
Lines 126-135 $template->param( Link Here
126
if ($do_it) {
126
if ($do_it) {
127
127
128
    my @data;
128
    my @data;
129
    my ( $results, $modules, $action );
129
    my ( $results, $modules, $actions );
130
    if ( $action[0]  ne '' ) { $action  = \@action; }     # match All means no limit
130
    if ( $actions[0]  ne '' ) { $actions  = \@actions; }     # match All means no limit
131
    if ( $modules[0] ne '' ) { $modules = \@modules; }    # match All means no limit
131
    if ( $modules[0] ne '' ) { $modules = \@modules; }    # match All means no limit
132
    $results = GetLogs( $datefrom, $dateto, $user, $modules, $action, $object, $info );
132
    $results = GetLogs( $datefrom, $dateto, $user, $modules, $actions, $object, $info );
133
    @data = @$results;
133
    @data = @$results;
134
    foreach my $result (@data) {
134
    foreach my $result (@data) {
135
135
Lines 188-203 if ($do_it) { Link Here
188
            dateto   => $dateto,
188
            dateto   => $dateto,
189
            user     => $user,
189
            user     => $user,
190
            object   => $object,
190
            object   => $object,
191
            action   => \@action,
192
            info     => $info,
191
            info     => $info,
193
            src      => $src,
192
            src      => $src,
193
            modules  => \@modules,
194
            actions  => \@actions,
194
        );
195
        );
195
196
196
        # Used modules
197
        foreach my $module (@modules) {
198
            $template->param( $module => 1 );
199
        }
200
201
        output_html_with_http_headers $input, $cookie, $template->output;
197
        output_html_with_http_headers $input, $cookie, $template->output;
202
    }
198
    }
203
    else {
199
    else {
204
- 

Return to bug 6911