Bugzilla – Attachment 37510 Details for
Bug 6911
Log viewer should remember search terms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 6911: Remember search terms in the log viewer tool
PASSED-QA-Bug-6911-Remember-search-terms-in-the-lo.patch (text/plain), 6.92 KB, created by
Katrin Fischer
on 2015-04-05 20:38:10 UTC
(
hide
)
Description:
[PASSED QA] Bug 6911: Remember search terms in the log viewer tool
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-04-05 20:38:10 UTC
Size:
6.92 KB
patch
obsolete
>From b2c50b474d4af5aefa4fa6eaaf7caea6eae3a213 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 27 Mar 2015 10:03:32 +0100 >Subject: [PATCH] [PASSED QA] Bug 6911: Remember search terms in the log viewer > tool >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The modules and actions selected by the user are now selected when a >log search is done. >Note that this patch also add the multiple attribute to the actions >select in order to add the ability to select several actions. >The code to do that already existed. > >Test plan: >1/ Go on the log viewer tool (tools/viewlog.pl) >2/ Launch a search with modules and actions selected. >3/ Confirm that the values you have selected is still selected after the >search. > >Patch works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 53 ++++++++++++++-------- > tools/viewlog.pl | 16 +++---- > 2 files changed, 41 insertions(+), 28 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index 96cac2d..634092f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -67,24 +67,41 @@ > <label for="user">Librarian:</label> > <input type="text" name="user" id="user" value="[% user %]" /> > </li> >- <li> >- <label for="modules">Module:</label> >- <select name="modules" id="modules" multiple="multiple"> >- <option value="" selected="selected">All</option> >- [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' ] %] >- <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option> >- [% END %] >- </select> >- </li> >- <li> >- <label for="action">Action:</label> >- <select name="action" id="action"> >- <option value ="">All</option> >- [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'CREATE' ] %] >- <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option> >- [% END %] >- </select> >- </li> >+ <li> >+ <label for="modules">Modules:</label> >+ <select name="modules" id="modules" multiple="multiple"> >+ [% UNLESS modules %] >+ <option value="" selected="selected">All</option> >+ [% ELSE %] >+ <option value="">All</option> >+ [% END %] >+ [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' ] %] >+ [% IF modules.grep(modx).size %] >+ <option value="[% modx %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option> >+ [% ELSE %] >+ <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="actions">Actions:</label> >+ <select name="actions" id="actions" multiple="multiple"> >+ [% UNLESS actions %] >+ <option value="" selected="selected">All</option> >+ [% ELSE %] >+ <option value="">All</option> >+ [% END %] >+ >+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'CREATE' ] %] >+ [% IF actions.grep(actx).size %] >+ <option value="[% actx %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option> >+ [% ELSE %] >+ <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> > <li> > <label for="object">Object: </label> > <input type="text" id="object" name="object" value="[% object %]" /> >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index 6f5ea03..9b81d50 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -47,7 +47,7 @@ $debug or $debug = $cgi_debug; > my $do_it = $input->param('do_it'); > my @modules = $input->param("modules"); > my $user = $input->param("user"); >-my @action = $input->param("action"); >+my @actions = $input->param("actions"); > my $object = $input->param("object"); > my $info = $input->param("info"); > my $datefrom = $input->param("from"); >@@ -126,10 +126,10 @@ $template->param( > if ($do_it) { > > my @data; >- my ( $results, $modules, $action ); >- if ( $action[0] ne '' ) { $action = \@action; } # match All means no limit >+ my ( $results, $modules, $actions ); >+ if ( $actions[0] ne '' ) { $actions = \@actions; } # match All means no limit > if ( $modules[0] ne '' ) { $modules = \@modules; } # match All means no limit >- $results = GetLogs( $datefrom, $dateto, $user, $modules, $action, $object, $info ); >+ $results = GetLogs( $datefrom, $dateto, $user, $modules, $actions, $object, $info ); > @data = @$results; > foreach my $result (@data) { > >@@ -188,16 +188,12 @@ if ($do_it) { > dateto => $dateto, > user => $user, > object => $object, >- action => \@action, > info => $info, > src => $src, >+ modules => \@modules, >+ actions => \@actions, > ); > >- # Used modules >- foreach my $module (@modules) { >- $template->param( $module => 1 ); >- } >- > output_html_with_http_headers $input, $cookie, $template->output; > } > else { >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6911
:
37294
|
37321
| 37510 |
37961
|
37968