From ff49528a04a139a3e7d40e03a34a06880c1fff82 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Nov 2020 17:16:36 +0000 Subject: [PATCH] Bug 26959: Reindent batch item modification template This patch reindents the batch item modification template to make indentation consistent. Some lines have been split up. Some markup issues have been corrected: Removed script "type" attribute, removed obsolete "CDATA" markers, removed obsolete IE-specific conditional comment. To test, apply the patch and go to Tools -> Batch item modification. - Test the process of submitting a barcode file, and item number file, and a list of barcodes. - Confirm that everything works as expected. Use your preferred method for checking the differences between files while ignoring whitespace. I use diff with the "-w" flag, but I've been known to leave my car keys in the refrigerator from time to time. The only changes you see should be split lines. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- .../prog/en/modules/tools/batchMod-edit.tt | 691 +++++++++--------- 1 file changed, 362 insertions(+), 329 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index 0ed9ed2ab4..4b42789a3d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -10,372 +10,405 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("js/pages/batchMod.js") | $raw %] - [% Asset.css("css/addbiblio.css") | $raw %] [% Asset.css("css/humanmsg.css") | $raw %] [% INCLUDE 'select2.inc' %] - + -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] + [% INCLUDE 'header.inc' %] + [% INCLUDE 'cat-search.inc' %] - + -
+
- [% IF ( show ) %] -

Batch item modification

- [% ELSE %] -

Batch item modification results

-
+ [% IF ( show ) %] +

Batch item modification

+ [% ELSE %] +

Batch item modification results

+
[% IF (modified_items) %] - [% modified_items | html %] item(s) modified (with [% modified_fields | html %] field(s) modified). + [% modified_items | html %] item(s) modified (with [% modified_fields | html %] field(s) modified). [% ELSE %] - No items modified. + No items modified. [% END %] -
- [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] - [% IF searchid %] - Return to the record - [% ELSE %] - Return to the record - [% END %] - [% ELSIF src %] - Return to where you were - [% ELSE %] - Return to batch item modification - [% END %] +
+ [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] + [% IF searchid %] + Return to the record + [% ELSE %] + Return to the record + [% END %] + [% ELSIF src %] + Return to where you were + [% ELSE %] + Return to batch item modification + [% END %]
-
- [% END %] -[% IF ( barcode_not_unique ) %]
Error saving item: Barcode must be unique.
[% END %] -[% IF ( no_next_barcode ) %]
Error saving items: Unable to automatically determine values for barcodes. No item has been inserted.
[% END %] +
+ [% END %] - [% IF ( notfoundbarcodes.size ) %] -

Warning, the following barcodes were not found:

- - - - - - [% FOREACH notfoundbarcode IN notfoundbarcodes %] - - [% END %] - -
Barcodes not found
[% notfoundbarcode |html %]
- [% IF ( item_loop ) %] - [% UNLESS ( too_many_items_display ) %] -

The following barcodes were found:

- [% END %] + [% IF ( barcode_not_unique ) %] +
+ Error saving item: Barcode must be unique. +
[% END %] - [% END %] - [% IF ( notfounditemnumbers.size ) %] -

Warning, the following itemnumbers were not found:

- - - - - - [% FOREACH notfounditemnumber IN notfounditemnumbers %] - + [% IF ( no_next_barcode ) %] +
+ Error saving items: Unable to automatically determine values for barcodes. No item has been inserted. +
+ [% END %] + + [% IF ( notfoundbarcodes.size ) %] +
+

Warning, the following barcodes were not found:

+
+ +
Itemnumbers not found
[% notfounditemnumber |html %]
+ + + + + [% FOREACH notfoundbarcode IN notfoundbarcodes %] + + [% END %] + +
Barcodes not found
[% notfoundbarcode |html %]
+ + [% IF ( item_loop ) %] + [% UNLESS ( too_many_items_display ) %] +

The following barcodes were found:

[% END %] - - - [% IF ( item_loop ) %] - [% UNLESS ( too_many_items_display ) %] -

The following itemnumbers were found:

[% END %] - [% END %] - [% END %] + [% END %] + [% IF ( notfounditemnumbers.size ) %] +
+

Warning, the following itemnumbers were not found:

+
+ + + + + + + [% FOREACH notfounditemnumber IN notfounditemnumbers %] + + [% END %] + +
Itemnumbers not found
[% notfounditemnumber |html %]
+ [% IF ( item_loop ) %] + [% UNLESS ( too_many_items_display ) %] +

The following itemnumbers were found:

+ [% END %] + [% END %] + [% END %] -
- - - - - - - [% IF biblionumber %] - - [% END %] -[% IF ( item_loop ) %] - [% IF show %] - - [% END %] -
+ + + + + + + + [% IF biblionumber %] + + [% END %] -

Show/hide columns: - [% FOREACH item_header_loo IN item_header_loop %] - - [% END %] -

- - - - - - - [% FOREACH item_header_loo IN item_header_loop %] - - [% END %] - - - - [% FOREACH item_loo IN item_loop %] - + [% IF ( item_loop ) %] [% IF show %] - [% IF item_loo.nomod %] - - [% ELSE %] - - [% END %] - [% ELSE %] - + [% END %] - - - [% FOREACH item_valu IN item_loo.item_value %] - [% END %] - [% END %] - -
 TitleHolds [% item_header_loo.header_value | html %]
Cannot edit  - - - [% IF item_loo.holds %] - [% IF item_loo.item_holds %] - - [% ELSE %] - - [% END %] - [% ELSE %] - [% IF item_loo.holds %] - - [% ELSE %] - - [% END %] - [% END %] - [% IF item_loo.holds %] - [% item_loo.item_holds | html %]/[% item_loo.holds | html %] - [% ELSE %] - [% item_loo.holds | html %] - [% END %] - - [% item_valu.field | html %]
-
-[% END %] -[% IF ( simple_items_display || job_completed ) %] - [% IF ( too_many_items_display ) %] -

Too many items ([% too_many_items_display | html %]): You have edited more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.

- [% ELSE %] -

The following items were modified:

-
    - [% FOREACH simple_items_displa IN simple_items_display %] -
  • - [% IF ( CAN_user_editcatalogue_edit_items ) %][% simple_items_displa.barcode | html %][% ELSE %][% simple_items_displa.barcode | html %][% END %] -
  • - [% END %] -
- [% END %] -[% END %] +
-[% IF ( show ) %] +

+ Show/hide columns: + + + + + + + + -[% IF ( too_many_items_process ) %] -

Too many items ([% too_many_items_process | html %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') | html %] items in a batch.

-[% ELSIF ( too_many_items_display ) %] -

Too many items ([% too_many_items_display | html %]): You are editing more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.

- [% FOREACH itemnumber IN itemnumbers_array %] - - [% END %] -[% END %] + [% FOREACH item_header_loo IN item_header_loop %] + + + + + [% END %] +

-[% UNLESS (too_many_items_process) %] -
-

Edit items

-
Checking the box right next to the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.
-
-
    - [% FOREACH ite IN item %] -
  1. -
    - [% SET mv = ite.marc_value %] - [% IF ( ite.mandatory ) %] -
    + [% END %] - [% IF ( mv.type == 'select' ) -%] - - [% ELSIF ( mv.type == 'text1' ) %] - - ... - [% ELSIF ( mv.type == 'text2' ) %] - - [% IF mv.noclick %] - ... + [% IF ( simple_items_display || job_completed ) %] + [% IF ( too_many_items_display ) %] +

    Too many items ([% too_many_items_display | html %]): You have edited more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.

    [% ELSE %] - ... +

    The following items were modified:

    +
      + [% FOREACH simple_items_displa IN simple_items_display %] +
    • + [% IF ( CAN_user_editcatalogue_edit_items ) %][% simple_items_displa.barcode | html %][% ELSE %][% simple_items_displa.barcode | html %][% END %] +
    • + [% END %] +
    [% END %] - [% mv.javascript | $raw %] - [% ELSIF ( mv.type == 'text' ) %] - - [% ELSIF ( mv.type == 'hidden' ) %] - - [% ELSIF ( mv.type == 'textarea' ) %] - - [%- END -%] + [% END %] - - s// - / - - + [% IF ( show ) %] - [% UNLESS ( ite.mandatory ) %] - - [% ELSE %] - Required - [% END %] + [% IF ( too_many_items_process ) %] +

    Too many items ([% too_many_items_process | html %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') | html %] items in a batch.

    + [% ELSIF ( too_many_items_display ) %] +

    Too many items ([% too_many_items_display | html %]): You are editing more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.

    + [% FOREACH itemnumber IN itemnumbers_array %] + + [% END %] + [% END %] - [% IF (mv.type == 'text' || mv.type == 'textarea' ) %] - RegEx - [% END %] + [% UNLESS (too_many_items_process) %] +
    +

    Edit items

    +
    Checking the box right next to the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.
    +
    +
      + [% FOREACH ite IN item %] +
    1. +
      + [% SET mv = ite.marc_value %] + [% IF ( ite.mandatory ) %] +
      -
    2. - [% END %] -
    -
    -
    - Other attributes -
      -
    1. -
      - - -
      -
    2. -
    -
    -
    -
    -
    Job progress:
    0%
    -
    -
    - - Cancel -
    -
    -[% ELSE %] -

    Return to batch item modification

    -[% END %] -[% ELSE %] -
    -[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] - [% IF searchid %] - Return to the record - [% ELSE %] - Return to the record - [% END %] -[% ELSIF src %] - Return to where you were -[% ELSE %] - Return to batch item modification -[% END %] -
    + [% IF ( mv.type == 'select' ) -%] + + [% ELSIF ( mv.type == 'text1' ) %] + + ... + [% ELSIF ( mv.type == 'text2' ) %] + + [% IF mv.noclick %] + ... + [% ELSE %] + ... + [% END %] + [% mv.javascript | $raw %] + [% ELSIF ( mv.type == 'text' ) %] + + [% ELSIF ( mv.type == 'hidden' ) %] + + [% ELSIF ( mv.type == 'textarea' ) %] + + [%- END -%] + + + s// + / + + + + [% UNLESS ( ite.mandatory ) %] + + [% ELSE %] + Required + [% END %] + + [% IF (mv.type == 'text' || mv.type == 'textarea' ) %] + RegEx + [% END %] + + + + + [% IF ( ite.repeatable ) %] + + Clone + + [% END %] + +
+ + [% END %] + + -[% END %] +
+ Other attributes +
    +
  1. +
    + + +
    +
  2. +
+
+
+
+
Job progress:
0%
+
+
+ + Cancel +
+
+ [% ELSE %] +

Return to batch item modification

+ [% END %] + [% ELSE %] +
+ [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] + [% IF searchid %] + Return to the record + [% ELSE %] + Return to the record + [% END %] + [% ELSIF src %] + Return to where you were + [% ELSE %] + Return to batch item modification + [% END %] +
+ [% END %] +
[% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5