From a40d8e5f6c1db2c866a134b69e67ce3594185fe9 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 Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/css/print.css | 2 +- .../prog/css/src/staff-global.scss | 16 +- .../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 | 122 ++++++------ .../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/patroncards/edit-batch.tt | 1 + .../en/modules/patroncards/edit-layout.tt | 1 + .../en/modules/patroncards/edit-profile.tt | 1 + .../en/modules/patroncards/image-manage.tt | 1 + .../prog/en/modules/patroncards/manage.tt | 1 + .../prog/en/modules/serials/serials-edit.tt | 2 +- .../prog/en/modules/tags/list.tt | 5 +- .../prog/en/modules/tags/review.tt | 1 + .../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 | 22 ++- .../prog/js/vue/components/ERM/Main.vue | 6 +- .../prog/js/vue/components/LeftMenu.vue | 29 ++- .../js/vue/components/Preservation/Main.vue | 6 +- members/accountline-details.pl | 1 + members/paycollect.pl | 1 + 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 +- 50 files changed, 555 insertions(+), 586 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/print.css b/koha-tmpl/intranet-tmpl/prog/css/print.css index 78ba3d57269..cee2890fecf 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/print.css +++ b/koha-tmpl/intranet-tmpl/prog/css/print.css @@ -317,7 +317,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 878634a08a4..168d2170b96 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -441,9 +441,7 @@ aside { } } -#menu, -#navmenulist, -#serialmenu { +.sidebar_menu { background-color: #E6E6E6; display: block; padding: 1em 0 1em 0; @@ -461,7 +459,8 @@ aside { padding-left: 0; ul { - font-size: 75%; + background-color: #F3F4F4; + font-size: 85%; } li { @@ -498,15 +497,6 @@ aside { } } -#admin_preferences #menu { - ul { - ul { - background-color: #F3F4F4; - font-size: 85%; - } - } -} - div { &.mainmenu { display: inline; 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 819be190c7b..4513d30a7d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc @@ -1,62 +1,60 @@ [% 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 4851cef036c..bd1e5af185f 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 56d4e923afa..546ce743cd5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -157,7 +157,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 86ca5d18ce2..2db47a59e7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc @@ -1,76 +1,70 @@ [% 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 a2ce9ac4900..a939d8b8ffd 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 @@ -327,7 +327,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 73d1fcdc783..87f04c13dc2 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 @@ -234,7 +234,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 8b4d01cc7a6..b025a54eb4b 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 {