From 30d9c0e2932814ecdfd79e426b32b8f2e7e67f6b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 30 Mar 2023 07:39:40 +0000 Subject: [PATCH] Bug 32731: Move cataloging tools to an include and show on tools home This patch moves the cataloging tools to an include, which is then added with a toggle to the tools homepage. This allows for the content to be on both pages, and can easily be hidden or shown by default. It ensures we don't have to maintain the same links in two places To test: 1 - Apply patch 2 - Ensure cataloging home page looks the same 3 - Ensure you can view/hide the cataloging tools on the tools page Signed-off-by: Sam Lau Signed-off-by: Kyle M Hall --- .../prog/en/includes/cataloging-tools.inc | 159 ++++++++++++++++++ .../en/modules/cataloguing/cataloging-home.tt | 159 +----------------- .../prog/en/modules/tools/tools-home.tt | 15 +- 3 files changed, 174 insertions(+), 159 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-tools.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-tools.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-tools.inc new file mode 100644 index 00000000000..10b0fb61ea4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-tools.inc @@ -0,0 +1,159 @@ +

Cataloging

+ +
+ +
+ [% IF ( CAN_user_tools_stage_marc_import || CAN_user_tools_manage_staged_marc ) %] +

Import

+ + [% END %] + + [% IF ( CAN_user_tools_export_catalog ) %] +

Export

+ + [% END %] + + [% IF ( CAN_user_tools_inventory || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) ) %] +

Reports

+
    + [% IF ( CAN_user_tools_inventory ) %] +
  • + Inventory +
  • + [% END %] + + [% IF ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] +
  • + Catalog concerns +
  • + [% END %] +
+ [% END %] + [% IF ( fast_cataloging && CAN_user_editcatalogue_fast_cataloging ) %] +

Fast cataloging

+
    + [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] +
  • + Fast cataloging +
  • + [% END %] +
+ [% END %] + + +
+ +
+ + [% IF ( CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel || CAN_user_tools_records_batchmod || CAN_user_tools_records_batchdel || CAN_user_tools_marc_modification_templates ) %] +

Batch editing

+ + [% END %] + + [% IF ( CAN_user_tools_items_batchmod || ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) ) %] +

Automation

+
    + [% IF ( CAN_user_tools_items_batchmod ) %] +
  • + Item modifications by age +
  • + [% END %] + [% IF ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) %] +
  • + Stock rotation +
  • + [% END %] +
+ [% END %] + +
+ +
+ + [% IF ( CAN_user_tools_label_creator || CAN_user_tools_upload_local_cover_images ) %] +

Tools

+ + [% END %] + + [% IF ( CAN_user_parameters ) %] +

Administration

+ + [% END %] + +
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt index 7cf87d2ee9a..d6758c8ee33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt @@ -59,164 +59,7 @@ [% END # /IF CAN_user_editcatalogue_edit_catalogue %] -

Cataloging

- -
- -
- [% IF ( CAN_user_tools_stage_marc_import || CAN_user_tools_manage_staged_marc ) %] -

Import

- - [% END %] - - [% IF ( CAN_user_tools_export_catalog ) %] -

Export

- - [% END %] - - [% IF ( CAN_user_tools_inventory || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) ) %] -

Reports

-
    - [% IF ( CAN_user_tools_inventory ) %] -
  • - Inventory -
  • - [% END %] - - [% IF ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] -
  • - Catalog concerns -
  • - [% END %] -
- [% END %] - [% IF ( fast_cataloging && CAN_user_editcatalogue_fast_cataloging ) %] -

Fast cataloging

-
    - [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] -
  • - Fast cataloging -
  • - [% END %] -
- [% END %] - - -
- -
- - [% IF ( CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel || CAN_user_tools_records_batchmod || CAN_user_tools_records_batchdel || CAN_user_tools_marc_modification_templates ) %] -

Batch editing

- - [% END %] - - [% IF ( CAN_user_tools_items_batchmod || ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) ) %] -

Automation

-
    - [% IF ( CAN_user_tools_items_batchmod ) %] -
  • - Item modifications by age -
  • - [% END %] - [% IF ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) %] -
  • - Stock rotation -
  • - [% END %] -
- [% END %] - -
- -
- - [% IF ( CAN_user_tools_label_creator || CAN_user_tools_upload_local_cover_images ) %] -

Tools

- - [% END %] - - [% IF ( CAN_user_parameters ) %] -

Administration

- - [% END %] - -
+ [% INCLUDE 'cataloging-tools.inc' %]
[%- SET StaffCataloguingHome = AdditionalContents.get( location => "StaffCataloguingHome", lang => lang, library => logged_in_user.branchcode ) -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt index 86ee4426f61..dcf897a51a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt @@ -199,5 +199,18 @@ - +
+ + +
+ [% INCLUDE 'intranet-bottom.inc' %] -- 2.30.2