From 430a64148207e7c390746060eb9ee31916185738 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 Aug 2016 18:50:20 +0100 Subject: [PATCH] Bug 17173: Quick jump to subfield edition form MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are too many clicks to jump to the edit form of a specific subfield. This patch adds a hidden feature (i.e. will not be polished or documented). When searching for a tag field from a marc framework structure, it's not possible to search for a tag subfield to jump directly to the subfield edition form. Test plan: On /admin/marctagstructure.pl?frameworkcode=FRAMEWORKCODE Search for a subfield (952$d) you will be redirected to the subfield edition form There is no check if the subfield does not exist. Followed test plan, works as expected. Signed-off-by: Marc Véron Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- admin/marctagstructure.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 784fb502e7..3d5c6e4949 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -285,6 +285,12 @@ if ($op eq 'add_form') { $template->param(select_display => "True", loop => \@loop_data); } else { + # Hidden feature: If search was field$subfield, redirect to the subfield edit form + my ( $tagfield, $tagsubfield ) = split /\$/, $searchfield; + if ( $tagsubfield ) { + print $input->redirect('/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield='.$tagfield.'&frameworkcode='.$frameworkcode.'#sub'.$tagsubfield.'field'); + exit; + } #here, normal old style : display every tags my ($count,$results)=StringSearch($searchfield,$frameworkcode); $cnt = $count; -- 2.39.5