Bug 12589 - Manage label batch view should show item type description instead of...
authorOwen Leonard <oleonard@myacpl.org>
Wed, 16 Jul 2014 20:06:40 +0000 (16:06 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 19 Aug 2014 15:44:55 +0000 (12:44 -0300)
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.

Signed-off-by: Robert Higgins <robert.higgins@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt

index 85bbb4e..6666537 100644 (file)
@@ -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' %]
                                                             [% 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>