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 <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-01-20 09:19:21 +00:00 committed by Jonathan Druart
parent 065c955cc6
commit d7175906ea
7 changed files with 21 additions and 13 deletions

View file

@ -164,6 +164,14 @@ td {
.btn {
white-space: nowrap;
}
&.selectcol {
width: 1ch;
}
&.numcol {
width: 3ch;
}
}
th {

View file

@ -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>

View file

@ -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 %]

View file

@ -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 %]

View file

@ -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 %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;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 %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;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>

View file

@ -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 %]" />

View file

@ -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">