From f46626370202fc5c770e2ed7815f19a0b21eb9fe 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 | 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 | 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/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(+), 578 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/print.css b/koha-tmpl/intranet-tmpl/prog/css/print.css index e2c9d152ac..bc598fe13f 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 43115f8ce8..689539fcb2 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; @@ -340,7 +338,8 @@ aside { padding-left: 0; ul { - font-size: 75%; + background-color: #F3F4F4; + font-size: 85%; } li { @@ -377,15 +376,6 @@ aside { } } -#admin_preferences #menu { - ul { - ul { - background-color: #F3F4F4; - font-size: 85%; - } - } -} - div { display: block; 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 2130e18792..91dc769692 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 3aa5b87b95..eb497674e4 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 3e5625eff0..a113c4e87d 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 90cbd56bf2..284d6d5a3c 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 8c2592c037..4784954da5 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 d7a504fb76..45a05379c1 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 a04f416812..2c4570163c 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 3878bfa742..5bb8542ed9 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 021b8f7bf7..17769521ae 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 e284b96a42..39c39ef716 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 cb6f892e5f..1e50ea90cf 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 1f3d48333a..b3b845a933 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 b106cffbea..39cb7c31be 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 631692721e..897edb1bcb 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 15acdb833e..aad00808f3 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 a7fa1a488d..424d72629f 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 217bc51393..d68e6debf2 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 {