[Patches] [PATCH] Bug 7270: Removing double itemtype on shelve contents page

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Tue Nov 29 02:05:04 NZDT 2011


From: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date: Mon, 28 Nov 2011 13:51:31 +0100
Subject: [PATCH] Bug 7270: Removing double itemtype on shelve contents page
Content-Type: text/plain; charset="utf-8"

Patch initializes template variable noItemTypeImages now.
Corrects the template so that description is not listed twice.
---
 .../prog/en/modules/virtualshelves/shelves.tt      |    2 +-
 virtualshelves/shelves.pl                          |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
index d7a34a1..09a40bb 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
@@ -194,7 +194,7 @@ function placeHold () {
 			</td>
 			[% END %]
 			[% UNLESS ( item_level_itypes ) %]<td>
-                [% UNLESS ( noItemTypeImages ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
+                [% UNLESS ( noItemTypeImages ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% ELSE %][% itemsloo.description %][% END %]
 			</td>[% END %]
 			<td>
 			[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl
index 0b208a9..62e1bb4 100755
--- a/virtualshelves/shelves.pl
+++ b/virtualshelves/shelves.pl
@@ -35,4 +35,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         flagsrequired   => { catalogue => 1 },
     }
 );
+$template->param(
+	noItemTypeImages => C4::Context->preference('noItemTypeImages'),
+);
 shelfpage('intranet', $query, $template, $loggedinuser, $cookie);
-- 
1.6.0.6




More information about the Patches mailing list