From 26ca47142410659c5882420753ff8cdb4af48a3e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 16 Nov 2022 12:08:56 +0000 Subject: [PATCH] Bug 32046: When adding a new records from a staged files, there are style issues This patch modifies the template for adding a record from a staged file in order to resolve some layout problems introduced by the staff redesign. This patch also corrects an problem with addorderiso2709.js: It included some template markup. The template variables are converted to a JS variable to prevent a JS error. Note that the QA tool's js_in_body error is invalid for this template which requires that the JS stay inside . To test you must have at least one MARC file staged for import. - Apply the patch and go to Acquisitions. - Locate a vendor and create a basket if necessary. - Add to the basket and choose the option of adding an order from a staged file. - Click "Add orders" next to one of the staged files. - On the Add orders from MARC file page, test that everything looks correct and works correctly: - In the first tab, expanding and collapsing order details by checking the checkbox or clicking the title. - Test the "MARC" and "Card" preview buttons. - Under the Item information tab, confirm that the layout looks correct and that the form works correctly, including plugin operations like auto barcode fill. - Test that, under the Default accounting details tab, changing the fund automatically sets the fund for each title in the first tab. Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../prog/css/src/staff-global.scss | 3 + .../prog/en/modules/acqui/addorderiso2709.tt | 539 +++++++++--------- .../intranet-tmpl/prog/js/addorderiso2709.js | 12 +- 3 files changed, 287 insertions(+), 267 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 054b6bf3a8..f739d19071 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2105,6 +2105,9 @@ li { } td { + &.actions { + white-space: nowrap; + } &.bookcoverimg { background: #FFF url("../img/spinner-small.gif") center center no-repeat; min-width: 120px; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 760db5213a..ada220608c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -10,9 +10,13 @@ Batch list [% END %] › Order staged MARC records › Acquisitions › Koha - +[% Asset.css("css/addbiblio.css") | $raw %] + [% INCLUDE 'doc-head-close.inc' %] [%# As long as cataloging plugins rely on 'script' tags added inline, JS must be in the header %] + [% Asset.js("js/acquisitions-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% Asset.js("js/acq.js") | $raw %] @@ -51,7 +55,7 @@
-
+
[% IF ( allmatch ) %]

No records imported

@@ -112,228 +116,237 @@ - [% FOREACH biblio IN import_biblio_list %] -
- - - - ( MARC | Card | Add order ) - - -
-
    -
  1. - - [% IF ( biblio_lis.overlay_status == 'no_match' ) %] - No match - [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %] - Match applied - [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %] - Match found - [% ELSE %] - [% biblio_lis.overlay_status | html %] - [% END %] - [% IF ( biblio.match_biblionumber ) %] - Matches biblio [% biblio.match_biblionumber | uri %] (score = [% biblio.match_score | html %]): [% biblio.match_citation | html %] - [% END %] - -
  2. -
  3. - - - Required -
  4. -
  5. - - -
  6. -
  7. - - -
  8. -
  9. - - % -
    If empty, discount rate from vendor will be used
    -
  10. -
  11. - [% IF ( close ) %] - - [% Budget_name | html %] - [% ELSE %] - - - - [% END %] -
  12. -
  13. - - -
  14. -
  15. - - -
  16. -
-
-
- [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %] - [% FOREACH item IN biblio.iteminfos %] -
- Item record [% item.item_id | html %] -
    -
  1. - - -
  2. - -
  3. - - + + + +
    +
      +
    1. + Match: + + [% IF ( biblio_lis.overlay_status == 'no_match' ) %] + No match + [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %] + Match applied + [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %] + Match found [% ELSE %] - + [% biblio_lis.overlay_status | html %] [% END %] - [% END %] - -
    2. -
    3. - - + Required +
    4. +
    5. + + +
    6. +
    7. + + +
    8. +
    9. + + % +
      If empty, discount rate from vendor will be used
      +
    10. +
    11. + [% IF ( close ) %] + + [% Budget_name | html %] + [% ELSE %] + + + [% END %] - -
    12. + +
    13. + + +
    14. +
    15. + + +
    16. +
    +
    +
    + [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %] + [% FOREACH item IN biblio.iteminfos %] +
    + Item record [% item.item_id | html %] +
      +
    1. + + +
    2. -
    3. - - -
    4. -
    5. - - -
    6. -
    7. - - -
    8. +
    9. + + +
    10. +
    11. + + +
    12. -
    13. - - -
    14. +
    15. + + +
    16. +
    17. + + +
    18. +
    19. + + +
    20. -
    21. - - -
    22. -
    23. - - -
    24. -
    25. - - -
    26. -
    27. - - - Required -
    28. -
    29. - - -
    30. -
    31. - - -
    32. -
    33. - - -
    34. -
    -
    - [% END # /FOREACH item %] -
    -
+
  • + + +
  • + +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + Required +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + +
    + [% END # /FOREACH item %] +
    + + + MARC + Card + Add order + + + [% END # /FOREACH biblio %] + + - [% END # /FOREACH biblio %]