Bugzilla – Attachment 115753 Details for
Bug 27493
Improve structure and style of checkbox columns in tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27493: Set column wifth for checkbox only columns
Bug-27493-Set-column-wifth-for-checkbox-only-colum.patch (text/plain), 14.00 KB, created by
PTFS Europe Sandboxes
on 2021-01-25 12:00:41 UTC
(
hide
)
Description:
Bug 27493: Set column wifth for checkbox only columns
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2021-01-25 12:00:41 UTC
Size:
14.00 KB
patch
obsolete
>From fec8b8a03e24d24ca52d996b79950c0e3f5ddd9e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 20 Jan 2021 09:19:21 +0000 >Subject: [PATCH] Bug 27493: Set column wifth 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 <sally.healey@cheshiresharedservices.gov.uk> >--- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 8 ++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 10 +++++----- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-search-history.tt | 8 ++++---- > koha-tmpl/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 @@ > <tbody> > [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] > <tr> >- <td class="noprint"> >+ <td class="noprint select selectcol"> > <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]"> > </td> > <td> >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 ) %] >- <td> >+ <td class="select selectcol"> > [% IF ( messaging_preference.transports_sms ) %] > <input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" checked="checked" /> > [% ELSE %] >@@ -98,7 +98,7 @@ > [% END %] > [% IF Koha.Preference('PhoneNotification') %] > [% IF ( messaging_preference.transport_phone ) %] >- <td> >+ <td class="select selectcol"> > [% IF ( messaging_preference.transports_phone ) %] > <input type="checkbox" > id="phone[% messaging_preference.message_attribute_id | html %]" >@@ -117,7 +117,7 @@ > [% END %] > [% IF ( TalkingTechItivaPhone ) %] > [% IF ( messaging_preference.transport_itiva ) %] >- <td> >+ <td class="select selectcol"> > [% IF ( messaging_preference.transports_itiva ) %] > <input type="checkbox" > id="itiva[% messaging_preference.message_attribute_id | html %]" >@@ -136,7 +136,7 @@ > [% END %] > > [% IF ( messaging_preference.transport_email ) %] >- <td> >+ <td class="select selectcol"> > [% IF ( messaging_preference.transports_email ) %] > <input type="checkbox" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> > [% ELSE %] >@@ -148,7 +148,7 @@ > [% END %] > > [% IF ( messaging_preference.has_digest ) %] >- <td> >+ <td class="select selectcol"> > [% IF ( messaging_preference.digest ) %] > <input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> > [% 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 @@ > </td> > > [% # Cell 2: Show result number if OpacHiddenItems is empty %] >- <td class="select selectcol"> >+ <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]"> > [% 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 @@ > <tbody> > [% FOREACH s IN current_biblio_searches %] > <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td class="select selectcol"><input type="checkbox" name="id" value="[% s.id | html %]" /></td> > <td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> > <td> > <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&[% s.query_cgi | $raw %]&count=[% countrss | uri %]&sort_by=acqdate_dsc&format=rss" aria-label="Subscribe to this search" class="rsssearchlink"> >@@ -125,7 +125,7 @@ > <tbody> > [% FOREACH s IN previous_biblio_searches %] > <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td class="select selectcol"><input type="checkbox" name="id" value="[% s.id | html %]" /></td> > <td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> > <td> > <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&[% s.query_cgi | $raw %]&count=[% countrss | uri %]&sort_by=acqdate_dsc&format=rss" aria-label="Subscribe to this search" class="rsssearchlink"> >@@ -177,7 +177,7 @@ > <tbody> > [% FOREACH s IN current_authority_searches %] > <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td class="select selectcol"><input type="checkbox" name="id" value="[% s.id | html %]" /></td> > <td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> > <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> > <td>[% s.total | html %]</td> >@@ -214,7 +214,7 @@ > <tbody> > [% FOREACH s IN previous_authority_searches %] > <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td class="select selectcol"><input type="checkbox" name="id" value="[% s.id | html %]" /></td> > <td><span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> > <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> > <td>[% s.total | html %]</td> >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 %] > <tr> > [% IF ( loggedinusername ) %] >- <td> >+ <td class="select selectcol"> > [% IF ( suggestions_loo.showcheckbox ) %] > [% SET can_delete_suggestion = 1 %] > <input type="checkbox" class="cb" id="id[% suggestions_loo.suggestionid | html %]" name="delete_field" data-title="[% suggestions_loo.title | html %]" value="[% suggestions_loo.suggestionid | html %]" /> >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 %] > <tr> >- <td> >+ <td class="select selectcol"> > <input type="checkbox" name="del[% MY_TAG.tag_id | html %]" value="del[% MY_TAG.tag_id | html %]"> > </td> > <td class="tagterm"> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27493
:
115416
|
115428
|
115753
|
115754
|
115847
|
115922
|
115923
|
115932