From afcd1d6a281b83d03b4ad465ee46cc9631d251bb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 17 Dec 2024 15:48:13 +0000 Subject: [PATCH] Bug 38664: Fixes for list and some tools templates tools/automatic_item_modification_by_age.tt tools/batchMod-del.tt tools/batchMod-edit.tt tools/batch_delete_records.tt tools/batch_extend_due_dates.tt tools/batch_record_modification.tt tools/cleanborrowers.tt tools/export.tt tools/import_borrowers.tt tools/inventory.tt tools/marc_modification_templates.tt tools/overduerules.tt tools/picture-upload.tt tools/quotes.tt tools/stage-marc-import.tt tools/stockrotation.tt tools/upload-images.tt tools/viewlog.tt virtualshelves/shelves.tt --- .../automatic_item_modification_by_age.tt | 20 +++--- .../prog/en/modules/tools/batchMod-del.tt | 37 ++++++----- .../prog/en/modules/tools/batchMod-edit.tt | 22 ++++--- .../en/modules/tools/batch_delete_records.tt | 44 +++++++------ .../modules/tools/batch_extend_due_dates.tt | 7 +- .../tools/batch_record_modification.tt | 7 +- .../prog/en/modules/tools/cleanborrowers.tt | 10 +-- .../prog/en/modules/tools/export.tt | 12 ++-- .../prog/en/modules/tools/import_borrowers.tt | 11 ++-- .../prog/en/modules/tools/inventory.tt | 66 +++++++++++-------- .../tools/marc_modification_templates.tt | 2 +- .../prog/en/modules/tools/overduerules.tt | 6 +- .../prog/en/modules/tools/picture-upload.tt | 7 +- .../prog/en/modules/tools/quotes.tt | 2 +- .../en/modules/tools/stage-marc-import.tt | 16 +++-- .../prog/en/modules/tools/stockrotation.tt | 56 ++++++++-------- .../prog/en/modules/tools/upload-images.tt | 22 +++---- .../prog/en/modules/tools/viewlog.tt | 6 +- .../prog/en/modules/virtualshelves/shelves.tt | 29 ++++---- 19 files changed, 207 insertions(+), 175 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt index c2a54b89ba..0220165856 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt @@ -47,8 +47,6 @@ [% INCLUDE 'messages.inc' %] [% IF ( op == 'edit_form' ) %] -
- [% INCLUDE 'csrf-token.inc' %]

Rules for automatic item modifications by age

@@ -75,16 +73,20 @@ [% END %] [% FOR message IN messages %] - [% IF message.type == "error" %] -
- [% END %] - [% IF message.code == "unable_to_load_configuration" %] - An error occurs: Unable to load the configuration. - [% END %] -
+ [% SET message_class = "alert-info" %] + [% IF message.type == "error" %] + [% message_class = "alert-warning" %] + [% END %] +
+ [% IF message.code == "unable_to_load_configuration" %] + An error occurs: Unable to load the configuration. + [% END %] +
[% END %] [% IF op == 'edit_form' %] + + [% INCLUDE 'csrf-token.inc' %]
[% FOR rule IN rules %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt index a6cdfa08a4..4852c77d93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt @@ -60,20 +60,22 @@

Batch item deletion

[% FOREACH message IN messages %] - [% IF message.type == 'success' %] -
- [% ELSIF message.type == 'warning' %] -
- [% ELSIF message.type == 'error' %] -
- [% END %] - [% IF message.code == 'cannot_enqueue_job' %] - Cannot enqueue this job. - [% END %] - [% IF message.error %] - (The error was: [% message.error | html %], see the Koha log file for more information). - [% END %] -
+ [% SET message_type = "alert-info" %] + [% IF message.type == 'success' %] + [% message_type = "alert-info" %] + [% ELSIF message.type == 'warning' %] + [% message_type = "alert-warning" %] + [% ELSIF message.type == 'error' %] + [% message_type = "alert-warning" %] + [% END %] +
+ [% IF message.code == 'cannot_enqueue_job' %] + Cannot enqueue this job. + [% END %] + [% IF message.error %] + (The error was: [% message.error | html %], see the Koha log file for more information). + [% END %] +
[% END %] @@ -89,7 +91,7 @@ [% FOREACH notfoundbarcode IN notfoundbarcodes %] - [% notfoundbarcode |html %] + [% notfoundbarcode |html %] [% END %] @@ -104,7 +106,7 @@ [% FOREACH notfounditemnumber IN notfounditemnumbers %] - [% notfounditemnumber |html %] + [% notfounditemnumber |html %] [% END %] @@ -120,7 +122,7 @@ [% FOREACH barcode IN cannot_be_deleted %] - [% barcode | html %] + [% barcode | html %] [% END %] @@ -215,6 +217,7 @@
+ [% MACRO jsinclude BLOCK %] [% Asset.js("js/tools-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] 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 5c3ff93d4f..fc6a6fb319 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 @@ -83,13 +83,15 @@ [% END %] [% FOREACH message IN messages %] - [% IF message.type == 'success' %] -
- [% ELSIF message.type == 'warning' %] -
- [% ELSIF message.type == 'error' %] -
- [% END %] + [% SET message_class = "alert-info" %] + [% IF message.type == 'success' %] + [% message_class = "alert-info" %] + [% ELSIF message.type == 'warning' %] + [% message_class = "alert-warning" %] + [% ELSIF message.type == 'error' %] + [% message_class = "alert-warning" %] + [% END %] +
[% IF message.code == 'cannot_enqueue_job' %] Cannot enqueue this job. [% END %] @@ -120,7 +122,7 @@ [% FOREACH notfoundbarcode IN notfoundbarcodes %] - [% notfoundbarcode |html %] + [% notfoundbarcode |html %] [% END %] @@ -143,7 +145,7 @@ [% FOREACH notfounditemnumber IN notfounditemnumbers %] - [% notfounditemnumber |html %] + [% notfounditemnumber |html %] [% END %] @@ -224,7 +226,7 @@ Options
  1. -
    This option checks in items to remove them from patron accounts.
    Items are not marked found, nor do damaged/withdrawn statuses prevent this return, nor are item locations updated. This feature is intended to allow removal of checkouts from patron accounts without affecting fines or other statuses.

    +
    This option checks in items to remove them from patron accounts.
    Items are not marked found, nor do damaged/withdrawn statuses prevent this return, nor are item locations updated. This feature is intended to allow removal of checkouts from patron accounts without affecting fines or other statuses.

    -
    + Delete patrons directly from the database. Patron data will not be recoverable. -
    +

    -

    + Move patrons to the deleted patrons table. They can be deleted permanently by the cleanup_database script. -
    +

    - +

    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt index 4a34a6e3cb..4898afa4d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt @@ -289,11 +289,11 @@
    Choose a file [% IF ( dbfiles && (dbfiles.size > 0) ) %] -
      +
        [% FOREACH dbfile IN dbfiles %] -
      1. [% dbfile | html %]
      2. +
      3. [% END %] -
    +
[% ELSE %]

Unfortunately, no backups are available.

[% END %] @@ -316,11 +316,11 @@
Choose a file [% IF ( conffiles && (conffiles.size > 0) ) %] -
    +
      [% FOREACH conffile IN conffiles %] -
    1. [% conffile | html %]
    2. +
    3. [% END %] -
+ [% ELSE %]

Unfortunately, no backups are available.

[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt index 61dd789ed6..48322e04fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt @@ -52,10 +52,10 @@
[% INCLUDE 'messages.inc' %] -
-

Import patrons

+
[% IF ( uploadborrowers ) %] +

Import results

  • @@ -218,14 +218,13 @@
[% END %] +
[% ELSE %] +
  • Select a file to import into the borrowers table
  • If a card number exists in the table, you can choose whether to ignore the new one or overwrite the old one.
-
-
-
[% INCLUDE 'csrf-token.inc' %] @@ -391,9 +390,9 @@
-[% END %]
+[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 8658f7457d..4a8e44f468 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -16,6 +16,14 @@ [% t("Koha") | html %] [% END %] [% INCLUDE 'doc-head-close.inc' %] +[% FILTER collapse %] + +[% END %] @@ -107,9 +115,9 @@ Item location filters
  1. - - Home library - Current library + Location: + +
  2. @@ -160,18 +168,18 @@
  3. -
  4. - - + [% FOREACH class_source IN class_sources %] + [% IF class_source.cn_source == pref_class %] + + [% ELSE %] + [% END %] - -
  5. + [% END %] +
@@ -227,21 +235,23 @@
  • -
    -

    Select all | Clear all

    -
    - [% FOREACH itemtype IN itemtypes %] -
    - - +
    +
    +
    +

    Select all | Clear all

    +
    + + [% FOREACH itemtype IN itemtypes %] +
    + + +
    + [% END %] +
    - [% IF loop.count() % 4 == 0 && !loop.last() %] -
    -
    - [% END %] - [% END %] -
    -
    +
    +
    +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index 5cf3ccf1f0..a382b11338 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -124,7 +124,7 @@ [% ELSE %] -

    [% tx("Actions for template '{template_name}'", template_name = template_name ) | html %]

    +

    [% tx("Actions for template '{template_name}'", template_name = template_name ) | html %]

    [% IF ( ActionsLoop ) %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt index f5e6229ef9..a051a420d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt @@ -161,8 +161,10 @@
    [% ELSE %] -
    You don't have patron categories defined, or the patron categories are not set to receive overdue notices.
    -
    If this is not what you were expecting, go to patron categories

    + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt index cbe0180dee..49ef032082 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt @@ -139,11 +139,10 @@ - [% IF ( filetype == 'image' ) %] -
  • - [% ELSE %] -
  • Required diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt index 5d1108c5a6..e7a89228ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt @@ -94,7 +94,7 @@
  • - + Required
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index b0ee98c3f4..44ea01e92b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -52,13 +52,15 @@ [% INCLUDE 'messages.inc' %] [% FOREACH message IN messages %] - [% IF message.type == 'success' %] -
    - [% ELSIF message.type == 'warning' %] -
    - [% ELSIF message.type == 'error' %] -
    - [% END %] + [% SET message_class = "alert-info" %] + [% IF message.type == 'success' %] + [% message_class = "alert-info" %] + [% ELSIF message.type == 'warning' %] + [% message_class = "alert-warning" %] + [% ELSIF message.type == 'error' %] + [% message_class = "alert-warning" %] + [% END %] +
    [% IF message.code == 'cannot_enqueue_job' %] Cannot enqueue this job. [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt index 9fd126f44a..10baafe748 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt @@ -389,7 +389,7 @@

    [% sritemstotal | html %] items are still attached to this rota, those items will remain at their current stage libraries.

    [% END %] [% END %] -

    +

    [% INCLUDE 'csrf-token.inc' %] @@ -397,7 +397,7 @@
    No -

    +
    [% ELSIF (op == 'confirm_delete_stage') %] @@ -411,7 +411,7 @@ [% END %] [% END %] -

    +

    [% INCLUDE 'csrf-token.inc' %] @@ -419,7 +419,7 @@
    No -

    +
    [% ELSIF (op == 'manage_items') %] @@ -514,12 +514,12 @@ [%- FOREACH this_stage IN stages -%] + [% SET stage_class = "stage" %] [%- IF this_stage.stage_id == sritem.stage.stage_id -%] - - [%- ELSE -%] - + [% stage_class = stage_class _ " highlight_stage" %] [%- END -%] - [%- Branches.GetName(this_stage.branchcode_id) | html -%] ([%- this_stage.duration | html -%]) + + [%- Branches.GetName(this_stage.branchcode_id) | html -%] ([%- this_stage.duration | html -%]) » [%- END -%] [%- IF stages.size > 0 -%] @@ -530,30 +530,30 @@ [%- IF stages.size < 2 -%] [%- ELSE -%] - [%- IF !transfer -%] - - [%- ELSE -%] - - [%- END -%] - Move to next stage + [% SET button_title = "" %] + [% IF transfer %] + [% button_title = "Item is in transit, it will be directed to new stage when checked in" %] + [% END %] + + Move to next stage [%- END -%] [%- IF !transfer -%] - + [%- IF sritem.indemand -%] - Remove "In demand" + Remove "In demand" [%- ELSE -%] - Add "In demand" + Add "In demand" [%- END -%] [%- END -%] [%- IF !transfer -%] + Remove from rota [%- ELSE -%] - + Remove from rota [%- END -%] - Remove from rota [% END %] @@ -640,19 +640,19 @@ [% IF ( op == 'manage_stages' || op == 'manage_items' ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt index 32949e9e0f..67ff314592 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt @@ -178,10 +178,11 @@
    [% IF ( cover_images ) %] -
    + [% SET column_class = "col-sm-9" %] [% ELSE %] -
    + [% SET column_class = "col-sm-12" %] [% END %] +
    @@ -247,13 +248,14 @@ [% END %]
  • @@ -310,8 +312,6 @@ var biblionumber = "[% biblionumber | html %]"; [% Asset.js("js/upload-images.js") | $raw %] - - [% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index e4764e44e1..f28e15a90b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -294,7 +294,11 @@ [% ELSIF loopro.module == "SYSTEMPREFERENCE" || loopro.module == "REPORTS" || loopro.module == "NEWS" %]
    [% loopro.info | trim | html %]
    - + + +
    [% ELSIF loopro.module == "NOTICES" %]
    [% loopro.info | trim | html %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index c46c64ba12..9a7266ad9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -287,33 +287,37 @@ [% UNLESS ( item_level_itypes ) %] Item type [% END %] + [% SET sort_class = 'dt-orderable-asc dt-orderable-desc' %] [% IF sortfield == 'title' %] - - [% ELSE %] - + [% sort_class = sort_class _ " dt-ordering-" _ direction %] [% END %] + Title + + [% SET sort_class = 'dt-orderable-asc dt-orderable-desc' %] [% IF sortfield == 'author' %] - - [% ELSE %] - + [% sort_class = sort_class _ " dt-ordering-" _ direction %] [% END %] + Author + + [% SET sort_class = 'dt-orderable-asc dt-orderable-desc' %] [% IF sortfield == 'dateadded' %] - - [% ELSE %] - + [% sort_class = sort_class _ " dt-ordering-" _ direction %] [% END %] + Date added + + [% SET sort_class = 'dt-orderable-asc dt-orderable-desc' %] [% IF sortfield == 'itemcallnumber' %] - - [% ELSE %] - + [% sort_class = sort_class _ " dt-ordering-" _ direction %] [% END %] + Call number + @@ -337,7 +341,6 @@ [% itemsloo.XSLTBloc | $raw %] [% ELSE %] [% INCLUDE 'biblio-title.inc' biblio=itemsloo link = 1 %] - [% END %]

    [% IF ( itemsloo.notforloan ) %] -- 2.39.5