View | Details | Raw Unified | Return to bug 38713
Collapse All | Expand All

(-)a/C4/Creators/Lib.pm (-1 / +1 lines)
Lines 551-557 sub html_table { Link Here
551
        $field_count++;
551
        $field_count++;
552
        $col_index++;
552
        $col_index++;
553
    }
553
    }
554
    $$table[$row_index] = {header_fields => $fields};
554
    $$table[0] = {header_fields => $fields};
555
    $cols = $col_index;
555
    $cols = $col_index;
556
    $field_count *= scalar(@$data);     # total fields to be displayed in the table
556
    $field_count *= scalar(@$data);     # total fields to be displayed in the table
557
    $col_index = 0;
557
    $col_index = 0;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-49 / +48 lines)
Lines 138-194 Link Here
138
138
139
                                    <div class="page-section">
139
                                    <div class="page-section">
140
                                        <table id="batcht">
140
                                        <table id="batcht">
141
                                            [% FOREACH table_loo IN table_loop %]
141
                                            [% IF ( table_loop.0.header_fields ) %]
142
                                                [% IF ( table_loo.header_fields ) %]
142
                                                <thead>
143
                                                    <thead>
143
                                                    <tr>
144
                                                        <tr>
144
                                                        [% FOREACH header_field IN table_loop.0.header_fields %]
145
                                                            [% FOREACH header_field IN table_loo.header_fields %]
145
                                                            [% SWITCH header_field.field_label -%]
146
                                                                [% SWITCH header_field.field_label -%]
146
                                                                [% CASE "Label number" -%]
147
                                                                    [% CASE "Label number" -%]
147
                                                                    <th>Label number</th>
148
                                                                        <th>Label number</th>
148
                                                                [% CASE "Summary" -%]
149
                                                                    [% CASE "Summary" -%]
149
                                                                    <th class="anti-the">Summary</th>
150
                                                                        <th class="anti-the">Summary</th>
150
                                                                [% CASE "Item type" %]
151
                                                                    [% CASE "Item type" %]
151
                                                                    <th>Item type</th>
152
                                                                        <th>Item type</th>
152
                                                                [% CASE "Call number" %]
153
                                                                    [% CASE "Call number" %]
153
                                                                    <th>Call number</th>
154
                                                                        <th>Call number</th>
154
                                                                [% CASE "Barcode" %]
155
                                                                    [% CASE "Barcode" %]
155
                                                                    <th>Barcode</th>
156
                                                                        <th>Barcode</th>
156
                                                                [% CASE "Select" -%]
157
                                                                    [% CASE "Select" -%]
157
                                                                    <th>Select</th>
158
                                                                        <th>Select</th>
158
                                                                [% CASE %]
159
                                                                    [% CASE %]
159
                                                                    <th>[% header_field.field_label | html %]</th>
160
                                                                        <th>[% header_field.field_label | html %]</th>
160
                                                            [% END -%]
161
                                                                [% END -%]
161
                                                        [% END %]
162
                                                            [% END %]
162
                                                    </tr>
163
                                                        </tr>
163
                                                </thead>
164
                                                    </thead>
164
                                            [% END %]
165
                                                    <tbody>
165
                                            <tbody>
166
                                                [% ELSE %]
166
                                                [% FOREACH table_loo IN table_loop %]
167
                                                        <tr>
167
                                                    [%NEXT IF loop.first %]
168
                                                            [% FOREACH text_field IN table_loo.text_fields %]
168
                                                    <tr>
169
                                                                [% IF ( text_field.select_field ) %]
169
                                                        [% FOREACH text_field IN table_loo.text_fields %]
170
                                                                    <td class="actions">
170
                                                            [% IF ( text_field.select_field ) %]
171
                                                                        <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>
171
                                                                <td class="actions">
172
                                                                    <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>
172
173
173
                                                                        <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>
174
                                                                    <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>
174
                                                                    </td>
175
                                                                </td>
175
                                                                    <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
176
                                                                <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
176
                                                                [% ELSE %]
177
                                                            [% ELSE %]
177
                                                                    <td>
178
                                                                <td>
178
                                                                        [% IF ( text_field.field_name == '_item_type_tbl' ) %]
179
                                                                    [% IF ( text_field.field_name == '_item_type_tbl' ) %]
179
                                                                            [% ItemTypes.GetDescription( text_field.field_value ) | html %]
180
                                                                        [% ItemTypes.GetDescription( text_field.field_value ) | html %]
180
                                                                        [% ELSIF ( text_field.field_name == '_summary_tbl' ) %]
181
                                                                    [% ELSIF ( text_field.field_name == '_summary_tbl' ) %]
181
                                                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% text_field.field_value.biblionumber | uri %]">[% text_field.field_value.title | html %]</a>
182
                                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% text_field.field_value.biblionumber | uri %]">[% text_field.field_value.title | html %]</a>
182
                                                                            [% IF text_field.field_value.author %]| [% text_field.field_value.author | html %][% END %]
183
                                                                        [% IF text_field.field_value.author %]| [% text_field.field_value.author | html %][% END %]
183
                                                                        [% ELSE %]
184
                                                                    [% ELSE %]
184
                                                                            [% text_field.field_value | html %]
185
                                                                        [% text_field.field_value | html %]
185
                                                                        [% END %]
186
                                                                    [% END %]
186
                                                                    </td>
187
                                                                </td>
187
                                                                [% END %]
188
                                                            [% END %]
188
                                                            [% END %]
189
                                                        </tr>
189
                                                        [% END %]
190
                                                    </tr>
190
                                                [% END %]
191
                                                [% END %]
191
                                            [% END %]
192
                                            </tbody>
192
                                            </tbody>
193
                                        </table>
193
                                        </table>
194
                                    </div> <!-- /.page-section -->
194
                                    </div> <!-- /.page-section -->
195
- 

Return to bug 38713