From 715fe4ed2aae7cc42ec84b2cc9c8aa0e54424c3c 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 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. --- admin/marctagstructure.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 2b4f2a1..04ab8ca 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.8.1