From d7175906eaddcd970d879998f41a403bf2a6053c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 20 Jan 2021 09:19:21 +0000 Subject: [PATCH] Bug 27493: Set column width for checkbox only columns This patch updates the global OPAC css such that selectcol type columns in tables are fixed width at 1ch to ensure these columns do not get unneccessarily wide. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Test plan PAGES: opac-basket, opac-messaging, opac-results, opac-search-history, opac-suggestions and opac-tags. 1/ Notice that the column containing a checkbox on each of the above pages is of a mised width, often much larger than required 2/ Apply the patch and rebuild the css file as described above 3/ Notices that the column containing a checkbox on each fo the above pages is now of a standard, sensible, width. 4/ Signoff Signed-off-by: Sally Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 8 ++++++++ .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 10 +++++----- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- .../bootstrap/en/modules/opac-search-history.tt | 8 ++++---- .../opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt | 2 +- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index a33ba13211..47bf90623d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -164,6 +164,14 @@ td { .btn { white-space: nowrap; } + + &.selectcol { + width: 1ch; + } + + &.numcol { + width: 3ch; + } } th { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt index 90f21e5235..89932cb36b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -268,7 +268,7 @@ [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] - + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt index a8f8ee1790..f6766b2d8f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -85,7 +85,7 @@ [% END %] [% IF ( SMSSendDriver ) %] [% IF ( messaging_preference.transport_sms ) %] - + [% IF ( messaging_preference.transports_sms ) %] [% ELSE %] @@ -98,7 +98,7 @@ [% END %] [% IF Koha.Preference('PhoneNotification') %] [% IF ( messaging_preference.transport_phone ) %] - + [% IF ( messaging_preference.transports_phone ) %] + [% IF ( messaging_preference.transports_itiva ) %] + [% IF ( messaging_preference.transports_email ) %] [% ELSE %] @@ -148,7 +148,7 @@ [% END %] [% IF ( messaging_preference.has_digest ) %] - + [% IF ( messaging_preference.digest ) %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 26d3db9f8a..188af083bd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -271,7 +271,7 @@ [% # Cell 2: Show result number if OpacHiddenItems is empty %] - + [% UNLESS suppress_result_number %] [% SEARCH_RESULT.result_number | html %]. [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt index df8a53572d..5c4d6fe8f5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt @@ -80,7 +80,7 @@ [% FOREACH s IN current_biblio_searches %] - + [% s.time |$KohaDates with_hours => 1 %] @@ -125,7 +125,7 @@ [% FOREACH s IN previous_biblio_searches %] - + [% s.time |$KohaDates with_hours => 1 %] @@ -177,7 +177,7 @@ [% FOREACH s IN current_authority_searches %] - + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] @@ -214,7 +214,7 @@ [% FOREACH s IN previous_authority_searches %] - + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index e6e8197924..8249a03ef0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -354,7 +354,7 @@ [% FOREACH suggestions_loo IN suggestions_loop %] [% IF ( loggedinusername ) %] - + [% IF ( suggestions_loo.showcheckbox ) %] [% SET can_delete_suggestion = 1 %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt index 2f407b78fb..41f8962a66 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt @@ -138,7 +138,7 @@ [% FOREACH MY_TAG IN MY_TAGS %] [% IF MY_TAG.visible %] - + -- 2.39.5