From 4f5c6e080bf042e12e25a810b797e22cdc6daa2f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Dec 2024 12:56:07 +0100 Subject: [PATCH] Bug 38713: labels/label-edit-batch.tt The first row is the headers for thead, then the other rows are the tbody. Signed-off-by: Phil Ringnalda Signed-off-by: Lucas Gass --- C4/Creators/Lib.pm | 2 +- .../en/modules/labels/label-edit-batch.tt | 96 +++++++++---------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/C4/Creators/Lib.pm b/C4/Creators/Lib.pm index 169ba008de0..c8a83b26a39 100644 --- a/C4/Creators/Lib.pm +++ b/C4/Creators/Lib.pm @@ -551,7 +551,7 @@ sub html_table { $field_count++; $col_index++; } - $$table[$row_index] = {header_fields => $fields}; + $$table[0] = {header_fields => $fields}; $cols = $col_index; $field_count *= scalar(@$data); # total fields to be displayed in the table $col_index = 0; 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 a2ce9ac4900..1fe0b889dbe 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 @@ -138,57 +138,57 @@
- [% FOREACH table_loo IN table_loop %] - [% IF ( table_loo.header_fields ) %] - - - [% FOREACH header_field IN table_loo.header_fields %] - [% SWITCH header_field.field_label -%] - [% CASE "Label number" -%] - - [% CASE "Summary" -%] - - [% CASE "Item type" %] - - [% CASE "Call number" %] - - [% CASE "Barcode" %] - - [% CASE "Select" -%] - - [% CASE %] - - [% END -%] - [% END %] - - - - [% ELSE %] - - [% FOREACH text_field IN table_loo.text_fields %] - [% IF ( text_field.select_field ) %] - + + [% FOREACH header_field IN table_loop.0.header_fields %] + [% SWITCH header_field.field_label -%] + [% CASE "Label number" -%] + + [% CASE "Summary" -%] + + [% CASE "Item type" %] + + [% CASE "Call number" %] + + [% CASE "Barcode" %] + + [% CASE "Select" -%] + + [% CASE %] + + [% END -%] + [% END %] + + + [% END %] + + [% FOREACH table_loo IN table_loop %] + [%NEXT IF loop.first %] + + [% FOREACH text_field IN table_loo.text_fields %] + [% IF ( text_field.select_field ) %] + - - [% ELSE %] - - [% END %] + Export + + + [% ELSE %] + [% END %] - + [% END %] + [% END %] - [% END %]
Label numberSummaryItem typeCall numberBarcodeSelect[% header_field.field_label | html %]
- Delete + [% IF ( table_loop.0.header_fields ) %] +
Label numberSummaryItem typeCall numberBarcodeSelect[% header_field.field_label | html %]
+ Delete - Export - - [% IF ( text_field.field_name == '_item_type_tbl' ) %] - [% ItemTypes.GetDescription( text_field.field_value ) | html %] - [% ELSIF ( text_field.field_name == '_summary_tbl' ) %] - [% text_field.field_value.title | html %] - [% IF text_field.field_value.author %]| [% text_field.field_value.author | html %][% END %] - [% ELSE %] - [% text_field.field_value | html %] - [% END %] - + [% IF ( text_field.field_name == '_item_type_tbl' ) %] + [% ItemTypes.GetDescription( text_field.field_value ) | html %] + [% ELSIF ( text_field.field_name == '_summary_tbl' ) %] + [% text_field.field_value.title | html %] + [% IF text_field.field_value.author %]| [% text_field.field_value.author | html %][% END %] + [% ELSE %] + [% text_field.field_value | html %] + [% END %] +
-- 2.34.1