Bugzilla – Attachment 10646 Details for
Bug 4198
deleting an authority refreshes the page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4198 - deleting an authority refreshes the page
Bug-4198---deleting-an-authority-refreshes-the-pag.patch (text/plain), 4.08 KB, created by
Kyle M Hall
on 2012-07-05 14:35:33 UTC
(
hide
)
Description:
Bug 4198 - deleting an authority refreshes the page
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-07-05 14:35:33 UTC
Size:
4.08 KB
patch
obsolete
>From 00b4510a08023479dd07b8a1829a67031d7d7d75 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 5 Jul 2012 10:33:40 -0400 >Subject: [PATCH] Bug 4198 - deleting an authority refreshes the page > >Makes clicking a Delete link refresh the search that >was performed so that the results are still on the screen. >--- > authorities/authorities-home.pl | 44 +++++++++++++------- > .../en/modules/authorities/searchresultlist.tt | 4 +- > 2 files changed, 32 insertions(+), 16 deletions(-) > >diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl >index d687c78..02684b3 100755 >--- a/authorities/authorities-home.pl >+++ b/authorities/authorities-home.pl >@@ -54,6 +54,21 @@ foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtype > push @authtypesloop, \%row; > } > >+if ( $op eq "delete" ) { >+ ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { >+ template_name => "authorities/authorities-home.tmpl", >+ query => $query, >+ type => 'intranet', >+ authnotrequired => 0, >+ flagsrequired => { catalogue => 1 }, >+ debug => 1, >+ } >+ ); >+ &DelAuthority( $authid, 1 ); >+ >+ $op = "do_search"; >+} > if ( $op eq "do_search" ) { > my @marclist = $query->param('marclist'); > my @and_or = $query->param('and_or'); >@@ -69,7 +84,7 @@ if ( $op eq "do_search" ) { > SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, > ( $startfrom - 1 ) * $resultsperpage, > $resultsperpage, $authtypecode, $orderby ); >-# use Data::Dumper; warn Data::Dumper::Dumper(@$results); >+ > ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { > template_name => "authorities/searchresultlist.tmpl", >@@ -81,6 +96,18 @@ if ( $op eq "do_search" ) { > } > ); > >+ $template->param( >+ marclist => $query->param('marclist'), >+ and_or => $query->param('and_or'), >+ excluding => $query->param('excluding'), >+ operator => $query->param('operator'), >+ orderby => $query->param('orderby'), >+ value => $query->param('value'), >+ authtypecode => $query->param('authtypecode'), >+ startfrom => $startfrom, >+ resultsperpage => $resultsperpage, >+ ); >+ > my @field_data = (); > > # we must get parameters once again. Because if there is a mainentry, it >@@ -146,20 +173,7 @@ if ( $op eq "do_search" ) { > ); > > } >-elsif ( $op eq "delete" ) { >- ( $template, $loggedinuser, $cookie ) = get_template_and_user( >- { >- template_name => "authorities/authorities-home.tmpl", >- query => $query, >- type => 'intranet', >- authnotrequired => 0, >- flagsrequired => { catalogue => 1 }, >- debug => 1, >- } >- ); >- &DelAuthority( $authid, 1 ); >-} >-else { >+if ( $op eq '' ) { > ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { > template_name => "authorities/authorities-home.tmpl", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index 038959f..ed841f6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -8,7 +8,9 @@ function confirm_deletion(id) { > > var is_confirmed = confirm('Are you sure you want to delete this authority?'); > if (is_confirmed) { >- window.location="authorities-home.pl?op=delete&authid="+id; >+ window.location="authorities-home.pl?op=delete&authid=" >+ + id >+ + "&marclist=[% marclist %]&and_or=[% and_or %]&excluding=[% excluding %]&operator=[%operator%]&orderby=[% orderby %]&value=[% value %]&startfrom=[% startfrom %]&resultsperpage=[% resultsperpage %]"; > } > } > function Help() { >-- >1.7.2.5
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 4198
:
1900
|
10646
|
10647
|
10924
|
10925