Bugzilla – Attachment 7932 Details for
Bug 4912
After editing private list, user should be redirect to private lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 4912 [REVISED] After editing private list, user should be redirect to private lists
SIGNED-OFF-Bug-4912-REVISED-After-editing-private-.patch (text/plain), 5.47 KB, created by
Nicole C. Engard
on 2012-02-28 19:05:03 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 4912 [REVISED] After editing private list, user should be redirect to private lists
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-02-28 19:05:03 UTC
Size:
5.47 KB
patch
obsolete
>From c1782d9f246810e4b897c1404d240fa5b51cf9a5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 13 Feb 2012 12:12:25 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 4912 [REVISED] After editing private list, user should be redirect to private lists > >As far as I can tell there isn't a redirect in the code which is >triggered in the wake of a ModShelf() action. This patch adds a >redirect which is reflects the context of the original "edit" link. > >To test, edit the details of a list in the OPAC from: > >- the list of private lists >- the list of public lists >- the contents view of public or private list > >After each of these actions you should be redirected back to >the page where you clicked the "edit" link. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/VirtualShelves/Page.pm | 9 +++++++++ > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 10 +++++----- > 2 files changed, 14 insertions(+), 5 deletions(-) > >diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >index 7cab246..1727389 100644 >--- a/C4/VirtualShelves/Page.pm >+++ b/C4/VirtualShelves/Page.pm >@@ -168,6 +168,14 @@ sub shelfpage ($$$$$) { > }; > > ModShelf( $shelfnumber, $shelf ); >+ if($displaymode eq "viewshelf"){ >+ print $query->redirect( $pages{$type}->{redirect} . "?viewshelf=$shelfnumber" ); >+ } elsif($displaymode eq "publicshelves"){ >+ print $query->redirect( $pages{$type}->{redirect} ); >+ } else { >+ print $query->redirect( $pages{$type}->{redirect} . "?display=privateshelves" ); >+ } >+ exit; > > } elsif ( $op eq 'modif' ) { > my ( $shelfnumber2, $shelfname, $owner, $category, $sortfield ) = GetShelf($shelfnumber); >@@ -176,6 +184,7 @@ sub shelfpage ($$$$$) { > $edit = 1; > $template->param( > edit => 1, >+ display => $displaymode, > shelfnumber => $shelfnumber2, > shelfname => $shelfname, > owner => $owner, >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >index 7d9d4d2..bf44771 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >@@ -209,12 +209,11 @@ $(function() { > > <a class="print tag_hides" href="opac-shelves.pl" onclick="print(); return false;">Print List</a> > >- [% IF ( manageshelf ) %] | <form method="get" action="opac-shelves.pl" class="tag_hides"><input type="hidden" name="op" value="modif" />[% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %] <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> <input type="submit" class="editshelf tag_hides" value="Edit List" /></form> >+ [% IF ( manageshelf ) %] | <form method="get" action="opac-shelves.pl" class="tag_hides"><input type="hidden" name="op" value="modif" /> >+ <input type="hidden" name="display" value="viewshelf" /> >+ <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> <input type="submit" class="editshelf tag_hides" value="Edit List" /></form> > <form method="post" action="opac-shelves.pl" class="tag_hides"> > <input type="hidden" value="1" name="shelves"/> >- [% IF ( showprivateshelves ) %] >- <input type="hidden" name="display" value="privateshelves" /> >- [% END %] > <input type="hidden" value="1" name="DEL-[% shelfnumber %]"/> > <input type="submit" class="deleteshelf" value="Delete List" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> > </form> [% END %] >@@ -377,7 +376,7 @@ $(function() { > <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt=">" border="0" /> <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfnumber %]"><em>[% shelfname |html %]</em></a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt=">" border="0" /> Editing</h3> > <form method="post" action="/cgi-bin/koha/opac-shelves.pl"> > <input type="hidden" name="op" value="modifsave" /> >- [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %] >+ <input type="hidden" name="display" value="[% display %]" /> > <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> > <fieldset class="rows"> > <ol> >@@ -523,6 +522,7 @@ $(function() { > <form action="/cgi-bin/koha/opac-shelves.pl" method="get"> > <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" /> > <input type="hidden" name="op" value="modif" /> >+ <input type="hidden" name="display" value="publicshelves" /> > <input type="submit" class="editshelf" value="Edit" /> > </form> > <form action="opac-shelves.pl" method="post"> >-- >1.7.2.3
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 4912
:
2274
|
2773
|
7631
|
7646
|
7923
|
7932
|
46329
|
46332
|
46370