From f129883b7e9226177e8da92f46d7d00ddaa53a10 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 28 Jun 2024 17:24:41 +0000 Subject: [PATCH] Bug 37222: Standardize markup for sidebar menus This patch updates sidebar menu markup so that it's consistent, with a common class (".sidebar_menu") and a unique ID. The style is tied to the class rather than the ID, simplifying the CSS. Note: This patch contains indentation changes so ignore whitespace when viewing the diff. The updated patch contains corrections to JavaScript which needed selectors to be changed to match the new markup. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) Check pages which contain each modified menu: - Circulation -> Check out to a patron - Catalog -> View a bibliographic record - Administration -> View system preferences - Acquisitions -> Acquisitions home - Cataloging -> Stock rotation -> Manage stages and manage items for a rotation - Cataloging -> Stage MARC records for import - Reports -> Acquisitions statistics - Reports -> View dictionary - Point of sale - E-resource management - Preservation - Serials - Tools -> Patron lists Sponsored-by: Athens County Public Libraries --- koha-tmpl/intranet-tmpl/prog/css/print.css | 2 +- .../prog/css/src/staff-global.scss | 4 +- .../prog/en/includes/acquisitions-menu.inc | 106 +++++----- .../prog/en/includes/admin-menu.inc | 7 +- .../prog/en/includes/biblio-view-menu.inc | 130 ++++++------ .../prog/en/includes/cat-menu.inc | 138 +++++++------ .../prog/en/includes/circ-menu.inc | 4 +- .../prog/en/includes/circ-nav.inc | 114 ++++++----- .../prog/en/includes/guided-reports-view.inc | 43 ++-- .../prog/en/includes/pos-menu.inc | 14 +- .../prog/en/includes/prefs-menu.inc | 4 +- .../prog/en/includes/preservation-menu.inc | 18 +- .../prog/en/includes/reports-menu.inc | 106 +++++----- .../prog/en/includes/serials-menu.inc | 68 ++++--- .../prog/en/includes/tools-menu.inc | 185 +++++++++--------- .../prog/en/includes/vendor-menu.inc | 28 +-- .../en/modules/labels/label-edit-batch.tt | 2 +- .../en/modules/labels/label-edit-layout.tt | 2 +- .../en/modules/labels/label-edit-profile.tt | 2 +- .../en/modules/labels/label-edit-range.tt | 2 +- .../en/modules/labels/label-edit-template.tt | 2 +- .../prog/en/modules/labels/label-manage.tt | 2 +- .../prog/en/modules/serials/serials-edit.tt | 2 +- .../prog/en/modules/tags/list.tt | 4 +- .../prog/en/modules/tools/stockrotation.tt | 10 +- .../prog/js/acquisitions-menu.js | 2 +- koha-tmpl/intranet-tmpl/prog/js/admin-menu.js | 10 +- .../intranet-tmpl/prog/js/staff-global.js | 10 +- koha-tmpl/intranet-tmpl/prog/js/tools-menu.js | 20 +- .../prog/js/vue/components/ERM/Main.vue | 6 +- .../prog/js/vue/components/LeftMenu.vue | 29 ++- .../js/vue/components/Preservation/Main.vue | 6 +- t/cypress/integration/ERM/Agreements_spec.ts | 2 +- .../integration/ERM/DataProviders_spec.ts | 2 +- t/cypress/integration/ERM/Dialog_spec.ts | 8 +- t/cypress/integration/ERM/Licenses_spec.ts | 2 +- t/cypress/integration/ERM/Packages_spec.ts | 2 +- t/cypress/integration/ERM/Titles_spec.ts | 2 +- .../integration/Preservation/Settings.ts | 2 +- t/cypress/integration/Preservation/Trains.ts | 2 +- .../integration/Preservation/WaitingList.ts | 4 +- t/cypress/support/e2e.js | 2 +- 42 files changed, 542 insertions(+), 568 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/print.css b/koha-tmpl/intranet-tmpl/prog/css/print.css index e2c9d152ac9..bc598fe13fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/print.css +++ b/koha-tmpl/intranet-tmpl/prog/css/print.css @@ -318,7 +318,7 @@ td.debit { #menu, #limitselect, #batchModify, -#navmenu, +.sidebar_menu, .gradient, .noprint, form#sortbyform, 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 43115f8ce8a..59571ea2c60 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -320,9 +320,7 @@ aside { } } -#menu, -#navmenulist, -#serialmenu { +.sidebar_menu { background-color: #E6E6E6; display: block; padding: 1em 0 1em 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc index 2130e187925..91dc7696925 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc @@ -1,59 +1,57 @@ [% USE Koha %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index 3aa5b87b95a..eb497674e44 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -1,7 +1,6 @@ [% USE Koha %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc index 3e5625eff0a..a113c4e87d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc @@ -2,21 +2,21 @@ [% USE Biblio %] [% SET biblio_object_id = biblio.biblionumber %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc index 90cbd56bf2c..284d6d5a3c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc @@ -1,133 +1,129 @@ [% USE Koha %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index 8c2592c037d..4784954da57 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -160,7 +160,7 @@ - [% IF patronimages && CAN_user_tools_batch_upload_patron_images %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc index d7a504fb764..0a851ef3ee6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc @@ -1,70 +1,69 @@ [% USE Koha %] [% USE Branches %] - + [% END %] + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc index a04f4168125..2c4570163c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc @@ -1,24 +1,21 @@ [% USE Koha %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc index 3878bfa7426..5bb8542ed93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc @@ -1,8 +1,7 @@ [% USE Branches %] [% USE Registers %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc index 021b8f7bf7a..17769521ae2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc @@ -1,5 +1,5 @@ [% USE HtmlId %] - [% BLOCK subtabs %] [% UNLESS ( searchfield ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-menu.inc index e284b96a423..39c39ef716a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-menu.inc @@ -1,11 +1,9 @@ [% USE Koha %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc index cb6f892e5f4..1e50ea90cfe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc @@ -1,59 +1,55 @@ [% USE Koha %] - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc index 1f3d48333ac..b3b845a9337 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc @@ -1,7 +1,6 @@ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index b106cffbea8..39cb7c31be0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -2,99 +2,98 @@ [% USE Branches %] [% USE Registers %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc index 631692721e1..897edb1bcbe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc @@ -1,16 +1,16 @@ [% IF ( booksellerid ) %] - + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index 15acdb833ec..aad00808f34 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -323,7 +323,7 @@ } $(document).ready(function() { - $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); + $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); [% IF table_loop %] $("#description").show(); [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt index a7fa1a488d7..424d72629f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt @@ -233,7 +233,7 @@ [% MACRO jsinclude BLOCK %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue index 217bc513936..d68e6debf24 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue @@ -108,7 +108,7 @@ export default {