Bugzilla – Attachment 177021 Details for
Bug 38713
Incorrect HTML structures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38713: labels/label-edit-batch.tt
Bug-38713-labelslabel-edit-batchtt.patch (text/plain), 11.48 KB, created by
Jonathan Druart
on 2025-01-23 14:52:44 UTC
(
hide
)
Description:
Bug 38713: labels/label-edit-batch.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-23 14:52:44 UTC
Size:
11.48 KB
patch
obsolete
>From 4f5c6e080bf042e12e25a810b797e22cdc6daa2f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <phil@chetcolibrary.org> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > 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 @@ > > <div class="page-section"> > <table id="batcht"> >- [% FOREACH table_loo IN table_loop %] >- [% IF ( table_loo.header_fields ) %] >- <thead> >- <tr> >- [% FOREACH header_field IN table_loo.header_fields %] >- [% SWITCH header_field.field_label -%] >- [% CASE "Label number" -%] >- <th>Label number</th> >- [% CASE "Summary" -%] >- <th class="anti-the">Summary</th> >- [% CASE "Item type" %] >- <th>Item type</th> >- [% CASE "Call number" %] >- <th>Call number</th> >- [% CASE "Barcode" %] >- <th>Barcode</th> >- [% CASE "Select" -%] >- <th>Select</th> >- [% CASE %] >- <th>[% header_field.field_label | html %]</th> >- [% END -%] >- [% END %] >- </tr> >- </thead> >- <tbody> >- [% ELSE %] >- <tr> >- [% FOREACH text_field IN table_loo.text_fields %] >- [% IF ( text_field.select_field ) %] >- <td class="actions"> >- <a class="btn btn-default btn-xs submit-form-link" id="deletebatch" href="#" data-op="cud-delete" data-batch_id="[% batch_id | html %]" data-label_id="[% text_field.field_value | html %]" data-method="post" data-action="/cgi-bin/koha/labels/label-edit-batch.pl" data-confirmation-msg="Are you sure you want to delete this?"><i class="fa fa-trash-can"></i> Delete</a> >+ [% IF ( table_loop.0.header_fields ) %] >+ <thead> >+ <tr> >+ [% FOREACH header_field IN table_loop.0.header_fields %] >+ [% SWITCH header_field.field_label -%] >+ [% CASE "Label number" -%] >+ <th>Label number</th> >+ [% CASE "Summary" -%] >+ <th class="anti-the">Summary</th> >+ [% CASE "Item type" %] >+ <th>Item type</th> >+ [% CASE "Call number" %] >+ <th>Call number</th> >+ [% CASE "Barcode" %] >+ <th>Barcode</th> >+ [% CASE "Select" -%] >+ <th>Select</th> >+ [% CASE %] >+ <th>[% header_field.field_label | html %]</th> >+ [% END -%] >+ [% END %] >+ </tr> >+ </thead> >+ [% END %] >+ <tbody> >+ [% FOREACH table_loo IN table_loop %] >+ [%NEXT IF loop.first %] >+ <tr> >+ [% FOREACH text_field IN table_loo.text_fields %] >+ [% IF ( text_field.select_field ) %] >+ <td class="actions"> >+ <a class="btn btn-default btn-xs submit-form-link" id="deletebatch" href="#" data-op="cud-delete" data-batch_id="[% batch_id | html %]" data-label_id="[% text_field.field_value | html %]" data-method="post" data-action="/cgi-bin/koha/labels/label-edit-batch.pl" data-confirmation-msg="Are you sure you want to delete this?"><i class="fa fa-trash-can"></i> Delete</a> > >- <a class="btn btn-default btn-xs export" href="#" data-batch-id="[% batch_id | html %]" data-label-id="[% text_field.field_value | html %]"><i class="fa-solid fa-share-from-square"></i> Export</a> >- </td> >- <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td> >- [% ELSE %] >- <td> >- [% IF ( text_field.field_name == '_item_type_tbl' ) %] >- [% ItemTypes.GetDescription( text_field.field_value ) | html %] >- [% ELSIF ( text_field.field_name == '_summary_tbl' ) %] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% text_field.field_value.biblionumber | uri %]">[% text_field.field_value.title | html %]</a> >- [% IF text_field.field_value.author %]| [% text_field.field_value.author | html %][% END %] >- [% ELSE %] >- [% text_field.field_value | html %] >- [% END %] >- </td> >- [% END %] >+ <a class="btn btn-default btn-xs export" href="#" data-batch-id="[% batch_id | html %]" data-label-id="[% text_field.field_value | html %]"><i class="fa-solid fa-share-from-square"></i> Export</a> >+ </td> >+ <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td> >+ [% ELSE %] >+ <td> >+ [% IF ( text_field.field_name == '_item_type_tbl' ) %] >+ [% ItemTypes.GetDescription( text_field.field_value ) | html %] >+ [% ELSIF ( text_field.field_name == '_summary_tbl' ) %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% text_field.field_value.biblionumber | uri %]">[% text_field.field_value.title | html %]</a> >+ [% IF text_field.field_value.author %]| [% text_field.field_value.author | html %][% END %] >+ [% ELSE %] >+ [% text_field.field_value | html %] >+ [% END %] >+ </td> > [% END %] >- </tr> >+ [% END %] >+ </tr> > [% END %] >- [% END %] > </tbody> > </table> > </div> <!-- /.page-section --> >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38713
:
176973
|
176974
|
176975
|
176976
|
176977
|
176978
|
176979
|
176980
|
176981
|
176982
|
176983
|
176984
|
176985
|
176986
|
176987
|
176988
|
176989
|
176990
|
176991
|
176992
|
176993
|
176994
|
176995
|
176996
|
176997
|
176998
|
176999
|
177000
|
177001
|
177002
|
177003
|
177004
|
177005
|
177006
|
177007
|
177008
|
177009
|
177010
|
177011
|
177012
|
177013
|
177014
|
177015
|
177016
|
177017
|
177018
|
177019
|
177020
| 177021 |
177022
|
177023
|
177024
|
177025
|
177026
|
177027
|
177028
|
177029
|
177030
|
177031
|
177032
|
177033
|
177034
|
177035
|
177036
|
177037
|
177038
|
177039
|
177040
|
177041
|
177042
|
177043
|
177044
|
177045
|
177046
|
177047
|
177048
|
177049
|
177050
|
177051
|
177052
|
177053
|
177054
|
177055
|
177056
|
177057
|
177058
|
177059
|
177060