Bugzilla – Attachment 2626 Details for
Bug 5221
Preselect tab containing itemtype/authorized value image in use
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-5221-Preselect-tab-containing-itemtype-a.patch (text/plain), 4.71 KB, created by
Owen Leonard
on 2010-09-15 12:51:57 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-09-15 12:51:57 UTC
Size:
4.71 KB
patch
obsolete
>From c086bf8d547cc33500f55a5ba0ba51780056be7d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 15 Sep 2010 08:47:06 -0400 >Subject: [PATCH] Fix for Bug 5221 - Preselect tab containing itemtype/authval image in use > >--- > C4/Koha.pm | 4 ++++ > .../prog/en/modules/admin/authorised_values.tmpl | 2 +- > .../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 cb93034..6cafe2a 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. > # >@@ -670,6 +671,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", >@@ -678,8 +680,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 367930a..cd2cf33 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 @@ > <ul> > <li><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=<!-- TMPL_VAR NAME="category" -->#none">None</a></li> > <!-- TMPL_LOOP NAME="imagesets" --> >- <li><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=<!-- TMPL_VAR NAME="category" -->#<!-- TMPL_VAR NAME="imagesetname" -->"><!-- TMPL_VAR name="imagesetname" --></a></li> >+ <!-- TMPL_IF NAME="imagesetactive" --><li class="ui-tabs-selected"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=<!-- TMPL_VAR NAME="category" -->#<!-- TMPL_VAR NAME="imagesetname" -->"><!-- TMPL_VAR name="imagesetname" --></a></li> > <!-- /TMPL_LOOP --> > </ul> > </div> >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 4c34695..a36c4ee 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 > <li> > <label for="description">Description</label><input type="text" id="description" name="description" size="48" maxlength="80" value="<!-- TMPL_VAR name="description" escape="HTML" -->" /> </li> > <!-- TMPL_IF NAME="noItemTypeImages" --> >- <li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=all&searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol> >+ <li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=all&searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol> > <!-- TMPL_ELSE --></ol> > <div id="icons" class="toptabs"> > <h5 style="margin-left:10px;">Choose an Icon:</h5> > <ul> > <li><a href="/cgi-bin/koha/admin/itemtypes.pl#none">None</a></li> > <!-- TMPL_LOOP NAME="imagesets" --> >- <li><a href="/cgi-bin/koha/admin/itemtypes.pl#<!-- TMPL_VAR NAME="imagesetname" -->"><!-- TMPL_VAR name="imagesetname" --></a></li> >+ <!-- TMPL_IF NAME="imagesetactive" --><li class="ui-tabs-selected"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/itemtypes.pl#<!-- TMPL_VAR NAME="imagesetname" -->"><!-- TMPL_VAR name="imagesetname" --></a></li> > <!-- /TMPL_LOOP --> >- <li><a href="/cgi-bin/koha/admin/itemtypes.pl#remote">Remote Image</a></li> >+ <!-- TMPL_IF NAME="remote_image" --><li class="ui-tabs-selected"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/itemtypes.pl#remote">Remote Image</a></li> > </ul> > </div> > <div id="none"><ul> >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5221
:
2624
| 2626