From 920178f51b08dc3aa0ed164c70ec4d47b23f363e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 17 Sep 2024 15:40:57 +0000 Subject: [PATCH] Bug 36454: (follow-up) Tweak CSS and add restricted status output This patch makes some tweaks to the style of the new information: We can use the Bootstrap 5 "badge" class and "warning" style to get the appearance we want. This patch also adds output of the patron's restricted status if present. To test, apply the patch and rebuild the staff interface CSS. Perform a patron search (from the checkout header search form for instance) and confirm that a "restricted" badge appears alongside the branch and expired badge. Signed-off-by: Pedro Amorim --- .../intranet-tmpl/prog/css/src/staff-global.scss | 13 +++++++++---- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 16 ++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) 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 b708bd36bf..a5bbd692a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2781,6 +2781,10 @@ td.bundle { } } } + + .badge { + font-size: 90%; + } } .ui-autocomplete-loading { @@ -4337,11 +4341,8 @@ div .suggestion_note { .ac-library { background-color: #EEE !important; - border-radius: 4px; + font-weight: normal; color: #000; - display: inline-block; - font-size: 80%; - padding: 1px 4px !important; } .ac-currentlibrary { @@ -4351,6 +4352,10 @@ div .suggestion_note { } } +.badge + .badge { + margin-left: .3rem; +} + .currentlibrary { background-color: #E6FCB7 !important; display: inline-block; diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index baa34c4d7b..e38d26ea6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -694,7 +694,7 @@ function patron_autocomplete(node, options) { " " + (item.other_name ? "(" + item.other_name.escapeHtml() + ")" : "") + cardnumber.escapeHtml() + - " " + + " " + (item.date_of_birth ? $date(item.date_of_birth) + ' (' + @@ -710,15 +710,19 @@ function patron_autocomplete(node, options) { }) + " " + (!singleBranchMode - ? '' + + ? '' + item.library.name.escapeHtml() + "" : "") + - "" + (expired - ? '' + - __("expired") + - "" + ? '' + + __("Expired") + + "" + : "") + + (item.restricted + ? '' + + __("Restricted") + + "" : "") + "" ) -- 2.39.2