From 45d1b7e6367f19bed74bd42578cf3e9ab31372d7 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 --- .../prog/en/includes/cataloging-tools.inc | 160 ++++++++++++++++++ .../en/modules/cataloguing/cataloging-home.tt | 159 +---------------- .../prog/en/modules/tools/tools-home.tt | 15 +- 3 files changed, 175 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 0000000000..fa2e6da620 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-tools.inc @@ -0,0 +1,160 @@ + +

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 1064f74980..fec2dbfda8 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 @@ -53,164 +53,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' %]
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 73508b2c64..4927e37cb9 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 @@ -201,5 +201,18 @@ - +
+ + +
+ [% INCLUDE 'intranet-bottom.inc' %] -- 2.30.2