From 7f8830c8b430e89bfbb59f68b151723911cc50b9 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 --- .../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 9413a0c1f14..671b98c67b4 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 @@ -58,164 +58,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 b805c6d1b79..dfdf814cead 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 @@ -198,5 +198,18 @@ - +
+ + +
+ [% INCLUDE 'intranet-bottom.inc' %] -- 2.30.2