From f2e4fa7b1bc2c555d66de96be96650b4a973869b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Oct 2010 09:29:23 -0400 Subject: [PATCH] Fix for Bug 5221 - Preselect tab containing itemtype/authval image in use Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- C4/Koha.pm | 4 ++++ .../prog/en/modules/admin/authorised_values.tmpl | 2 +- .../intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index dc2bcfa83b..d7ba1af1d3 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1,6 +1,7 @@ package C4::Koha; # Copyright 2000-2002 Katipo Communications +# Parts Copyright 2010 Nelsonville Public Library # # This file is part of Koha. # @@ -672,6 +673,7 @@ sub getImageSets { foreach my $imagesubdir ( @subdirectories ) { my @imagelist = (); # hashrefs of image info my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) ); + my $imagesetactive = 0; foreach my $thisimage ( @imagenames ) { push( @imagelist, { KohaImage => "$imagesubdir/$thisimage", @@ -680,8 +682,10 @@ sub getImageSets { checked => "$imagesubdir/$thisimage" eq $checked ? 1 : 0, } ); + $imagesetactive = 1 if "$imagesubdir/$thisimage" eq $checked; } push @imagesets, { imagesetname => $imagesubdir, + imagesetactive => $imagesetactive, images => \@imagelist }; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl index 367930a988..cd2cf33974 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl @@ -70,7 +70,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index 4c34695486..a36c4eedef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -162,16 +162,16 @@ Item Types Administration
  • " />
  • -
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • +
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • Choose an Icon:
      -- 2.39.5