From eba41e801cc8166e4b7f05bd2d4354e5f8ac5fa3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 15 Nov 2011 11:50:40 -0500 Subject: [PATCH] Fix for Bug 7227, "Delete all items" action should redirect to the detail view Using the delete all items function should now redirect back to the biblio view specified in the BiblioDefaultView system preference. Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain (cherry picked from commit 8121f5581ff0f39a31302edace0fc2cf66d65e71) Signed-off-by: Chris Nighswonger --- cataloguing/additem.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 3df2549a2c..a87085150f 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -464,7 +464,17 @@ if ($op eq "additem") { $nextop="additem"; } else { - print $input->redirect("/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=$biblionumber"); + my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); + my $views = { C4::Search::enabled_staff_search_views }; + if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { + print $input->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber"); + } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { + print $input->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber"); + } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { + print $input->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber"); + } else { + print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); + } exit; } } -- 2.39.5