From 6adcebb3f192dbe358daea11af050ffb72927983 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Wed, 16 Jul 2014 16:06:40 -0400
Subject: [PATCH] Bug 12589 - Manage label batch view should show item type
 description instead of code
Content-Type: text/plain; charset="utf-8"

When viewing the list of items in an existing label batch the item type
code is shown. This patch modifies the template to show the item type
description instead.

To test, go to Tools -> Labels -> Manage batches. If necessary, create a
batch with multiple items of different item types. Edit the batch and
confirm that the table of items shows item type description instead of
code.
---
 .../prog/en/modules/labels/label-edit-batch.tt     |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
index 85bbb4e..6666537 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
@@ -1,3 +1,4 @@
+[% USE ItemTypes %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Labels &rsaquo; Manage label batches</title>
     [% INCLUDE 'doc-head-close.inc' %]
@@ -242,7 +243,13 @@
                                                             [% IF ( text_field.select_field ) %]
                                                                 <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
                                                             [% ELSE %]
-                                                                <td>[% text_field.field_value %]</td>
+                                                                <td>
+                                                                    [% IF ( text_field.field_name == '_item_type_tbl' ) %]
+                                                                        [% ItemTypes.GetDescription( text_field.field_value ) %]
+                                                                    [% ELSE %]
+                                                                        [% text_field.field_value %]
+                                                                    [% END %]
+                                                                </td>
                                                             [% END %]
                                                         [% END %]
                                                     </tr>
-- 
1.7.9.5