From 0441b5ce46d66798180610ba115b4d4feef569fb Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Mon, 14 Nov 2022 11:07:51 -0500 Subject: [PATCH] Bug 32188: Only show template controls above item form if templates have been defined The new item templates above the item edit form should only show, when at least one template has been defined. Test Plan: 1) Browse to the item editor 2) Delete all templates 3) Note the template toolbar is displayed 4) Apply this patch 5) Reload the page, note the toolbar is not displayed 6) Create a new template, note the toolbar is now displayed 7) Delete that template, note the toolbar is no longer displayed Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/cataloguing/additem.tt | 91 ++++++++++--------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 05168fc3a4..e179b82e34 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -163,60 +163,61 @@

Edit item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]

[% END %] -
-
- + + + [% FOREACH t IN item_templates.owned %] + [% IF t.id == template_id %] + [% ELSE %] - + [% END %] - [% ELSE %] - [% IF CAN_user_editcatalogue_manage_item_editor_templates %] - + [% END %] + + + [% FOREACH t IN item_templates.shared %] + [% IF t.id == template_id %] + [% IF CAN_user_editcatalogue_manage_item_editor_templates %] + + [% ELSE %] + + [% END %] [% ELSE %] - + [% IF CAN_user_editcatalogue_manage_item_editor_templates %] + + [% ELSE %] + + [% END %] [% END %] [% END %] + + +
+
+ +
+
+
-
- -
-
- -
+ For session +
-
- -
+
+ +
-
- +
+ +
- - + [% END %]
[% PROCESS subfields_for_item subfields => subfields %] -- 2.39.2