Bugzilla – Attachment 98097 Details for
Bug 23594
Add ability to batch modify itemtypes from the suggestions page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23594: Restore previous view after delete or update itemtype
Bug-23594-Restore-previous-view-after-delete-or-up.patch (text/plain), 3.01 KB, created by
Katrin Fischer
on 2020-01-29 22:02:30 UTC
(
hide
)
Description:
Bug 23594: Restore previous view after delete or update itemtype
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-01-29 22:02:30 UTC
Size:
3.01 KB
patch
obsolete
>From 08570ea25de50882d3f89f7f9b165277f1a6d5b9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 22 Oct 2019 12:00:18 +0200 >Subject: [PATCH] Bug 23594: Restore previous view after delete or update > itemtype >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We want to restore the previous view when suggestions are deleted or >their itemtypes are updated. >To avoid c/p the code is moved to a new subroutine. > >Sponsored-by: BULAC - http://www.bulac.fr/ > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > suggestion/suggestion.pl | 36 +++++++++++++++++++++--------------- > 1 file changed, 21 insertions(+), 15 deletions(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 5f1210932c..29932e1d93 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -246,25 +246,12 @@ elsif ($op eq "update_status" ) { > $suggestion->{suggestionid} = $suggestionid; > &ModSuggestion($suggestion); > } >- my $params = ''; >- foreach my $key ( >- qw( >- displayby branchcode title author isbn publishercode copyrightdate >- collectiontitle suggestedby suggesteddate_from suggesteddate_to >- manageddate_from manageddate_to accepteddate_from >- accepteddate_to budgetid >- ) >- ) >- { >- $params .= $key . '=' . uri_escape($input->param($key)) . '&' >- if defined($input->param($key)); >- } >- print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params"); >+ redirect_with_params($input); > }elsif ($op eq "delete" ) { > foreach my $delete_field (@editsuggestions) { > &DelSuggestion( $borrowernumber, $delete_field,'intranet' ); > } >- $op = 'else'; >+ redirect_with_params($input); > } > elsif ( $op eq 'update_itemtype' ) { > my $new_itemtype = $input->param('suggestion_itemtype'); >@@ -272,6 +259,7 @@ elsif ( $op eq 'update_itemtype' ) { > next unless $suggestionid; > &ModSuggestion({ suggestionid => $suggestionid, itemtype => $new_itemtype }); > } >+ redirect_with_params($input); > } > elsif ( $op eq 'show' ) { > $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); >@@ -428,3 +416,21 @@ $template->param( > SuggestionStatuses => GetAuthorisedValues('SUGGEST_STATUS'), > ); > output_html_with_http_headers $input, $cookie, $template->output; >+ >+sub redirect_with_params { >+ my ( $input ) = @_; >+ my $params = ''; >+ foreach my $key ( >+ qw( >+ displayby branchcode title author isbn publishercode copyrightdate >+ collectiontitle suggestedby suggesteddate_from suggesteddate_to >+ manageddate_from manageddate_to accepteddate_from >+ accepteddate_to budgetid >+ ) >+ ) >+ { >+ $params .= $key . '=' . uri_escape(scalar $input->param($key)) . '&' >+ if defined($input->param($key)); >+ } >+ print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params"); >+} >-- >2.11.0
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 23594
:
94469
|
94520
|
94521
|
94834
|
94835
|
94836
|
97663
|
97664
|
97665
|
97693
|
97781
|
98094
|
98095
|
98096
| 98097 |
98098
|
98099