From 1d0bd7fc59f658325c1fa620cf791981853ac643 Mon Sep 17 00:00:00 2001 From: Zeno Tajoli Date: Sun, 17 May 2009 23:26:17 +0200 Subject: [PATCH] Bug 3162 Fix only for [forward port of tempoary fix 3.0.x] Note that this patch causes the authority subfield visibility to match 3.0.x, but at a cost - only two options are available now, hide all and show all, and much flexibility is lost. This will need to be improved. (cherry picked from commit 56831089ed654190a6b64265e75179957c044309) Signed-off-by: Galen Charlton --- admin/auth_subfields_structure.pl | 123 ++++++++++-------- .../admin/auth_subfields_structure.tmpl | 6 +- .../help/admin/auth_subfields_structure.tmpl | 6 +- 3 files changed, 73 insertions(+), 62 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index fd86778fab..dd0d9d045f 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -162,34 +162,37 @@ if ($op eq 'add_form') { ); $row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden', -id=>"ohidden$i", - -values=>['0','1','2'], - -labels => {'0'=>'Show','1'=>'Show Collapsed', - '2' =>'Hide', - }, - -default=>substr($data->{'hidden'},0,1), - -size=>1, - -multiple=>0, - ); - $row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden', - -id=>"ihidden$i", - -values=>['0','1','2'], - -labels => {'0'=>'Show','1'=>'Show Collapsed', - '2' =>'Hide', - }, - -default=>substr($data->{'hidden'},1,1), - -size=>1, - -multiple=>0, - ); - $row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden', - -id=>"ehidden$i", - -values=>['0','1','2'], - -labels => {'0'=>'Show','1'=>'Show Collapsed', - '2' =>'Hide', - }, - -default=>substr($data->{'hidden'}." ",2,1), + #-values=>['0','1','2'], + #-labels => {'0'=>'Show','1'=>'Show Collapsed', + # '2' =>'Hide', + # }, + -values=>['0','-5'], + -labels => {'0'=>'Show All','-5'=>'Hide All',}, + -default=>$data->{'hidden'}, + #-default=>"-5", -size=>1, -multiple=>0, ); + #$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden', + # -id=>"ihidden$i", + # -values=>['0','1','2'], + # -labels => {'0'=>'Show','1'=>'Show Collapsed', + # '2' =>'Hide', + # }, + # -default=>substr($data->{'hidden'},1,1), + # -size=>1, + # -multiple=>0, + # ); + #$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden', + # -id=>"ehidden$i", + # -values=>['0','1','2'], + # -labels => {'0'=>'Show','1'=>'Show Collapsed', + # '2' =>'Hide', + # }, + # -default=>substr($data->{'hidden'}." ",2,1), + # -size=>1, + # -multiple=>0, + # ); $row_data{tagsubfieldinput} = "{'tagsubfield'}."\" id=\"tagsubfield\" />"; $row_data{tagsubfield} = $data->{'tagsubfield'}; $row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'}); @@ -275,39 +278,44 @@ if ($op eq 'add_form') { ); $row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden', -id=>"ohidden$i", - -values=>['0','1','2'], - -labels => {'0'=>'Show','1'=>'Show Collapsed', - '2' =>'Hide', - }, - -default=>"0", + #-values=>['0','1','2'], + #-labels => {'0'=>'Show','1'=>'Show Collapsed', + # '2' =>'Hide', + # }, + -values=>['0','-5'], + -labels => {'0'=>'Show All','-5'=>'Hide All',}, + #-default=>"0", + -default=>$data->{'hidden'}, + #-default=>"-5", -size=>1, -multiple=>0, ); - $row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden', - -id=>"ihidden$i", - -values=>['0','1','2'], - -labels => {'0'=>'Show','1'=>'Show Collapsed', - '2' =>'Hide', - }, - -default=>"0", - -size=>1, - -multiple=>0, - ); - $row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden', - -id=>"ehidden$i", - -values=>['0','1','2'], - -labels => {'0'=>'Show','1'=>'Show Collapsed', - '2' =>'Hide', - }, - -default=>"0", - -size=>1, - -multiple=>0, - ); - $row_data{tagsubfieldinput} = - ""; + #$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden', + # -id=>"ihidden$i", + # -values=>['0','1','2'], + # -labels => {'0'=>'Show','1'=>'Show Collapsed', + # '2' =>'Hide', + # }, + # -default=>"0", + # -size=>1, + # -multiple=>0, + # ); + #$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden', + # -id=>"ehidden$i", + # -values=>['0','1','2'], + # -labels => {'0'=>'Show','1'=>'Show Collapsed', + # '2' =>'Hide', + # }, + # -default=>"0", + # -size=>1, + # -multiple=>0, + # ); + $row_data{tagsubfieldinput} = "{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />"; + $row_data{tagsubfieldinput} = + ""; $row_data{tagsubfield} = $data->{'tagsubfield'}; $row_data{liblibrarian} = ""; $row_data{libopac} = ""; @@ -389,8 +397,8 @@ if ($op eq 'add_form') { my @seealso = $input->param('seealso'); my @hidden; my @ohidden = $input->param('ohidden'); - my @ihidden = $input->param('ihidden'); - my @ehidden = $input->param('ehidden'); + #my @ihidden = $input->param('ihidden'); + #my @ehidden = $input->param('ehidden'); my @authorised_values = $input->param('authorised_value'); my $authtypecode = $input->param('authtypecode'); my @frameworkcodes = $input->param('frameworkcode'); @@ -409,7 +417,8 @@ if ($op eq 'add_form') { my $authorised_value =$authorised_values[$i]; my $frameworkcode =$frameworkcodes[$i]; my $value_builder=$value_builder[$i]; - my $hidden = $ohidden[$i].$ihidden[$i].$ehidden[$i]; #collate from 3 hiddens; + #my $hidden = $ohidden[$i].$ihidden[$i].$ehidden[$i]; #collate from 3 hiddens; + my $hidden = $ohidden[$i]; #collate from 3 hiddens; my $isurl = $input->param("isurl$i")?1:0; if ($liblibrarian) { unless (C4::Context->config('demo') eq 1) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl index 7f77fdd175..1b431ecf93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl @@ -90,9 +90,9 @@ function displayMoreConstraint(numlayer){
Display
    -
  1. -
  2. -
  3. (see online help)
  4. +
  5. + ">Intranet: --> + ">Editor: (see online help) -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tmpl index 543a137aff..36c026eceb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/auth_subfields_structure.tmpl @@ -17,7 +17,8 @@
  • Text for librarian : what appears before the subfield in the librarian interface
  • Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead
  • Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed.
  • -
  • hidden : allows you to select possible visibility conditions. Each section OPAC INTRANET or Editor can be set separately:
  • + +
  • Display: allows you to select possible visibility conditions. It is used only with the 'MARC View'.
  • Is a linking field : Select this if you want to use this field for linking other authorities to this authority. The kohafield should be set to auth_header.linkid in this subfield(preferred) or any other subfield in this field :
  • URL : if checked, the subfield is an URL, and can be clicked
  • Auth value : means the value is not free, but in the authorized value list of the selected type
  • @@ -32,4 +33,5 @@ - \ No newline at end of file + + -- 2.39.5