Bug 30952: Harmonize tables style
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 27 Sep 2022 09:27:27 +0000 (11:27 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 12 Oct 2022 19:15:05 +0000 (16:15 -0300)
- 2 pixels border below <thead> and above <tfoot>
- No border above or below table cells (in thead, tbody and tfoot)
- No border around tables

Issue #22

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss
koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

index 86becf8..d7cea5b 100644 (file)
@@ -1,7 +1,13 @@
 table {
     border-collapse: collapse;
 
-    border-top: 1px solid $table-border-color;
+    thead {
+        border-bottom: 2px solid $table-border-color;
+    }
+
+    tfoot {
+        border-top: 2px solid $table-border-color;
+    }
 
     .btn-group {
         white-space: nowrap;
@@ -70,14 +76,18 @@ table {
 
     &.dataTable {
         border-collapse: collapse;
-        border: none;
         margin-top: .5em;
         margin-bottom: .5em;
 
+        &.no-footer {
+            border: none;
+        }
+
         tfoot {
             td,
             th {
                 padding: .5em;
+                border-top: none;
             }
         }
 
@@ -85,6 +95,7 @@ table {
             th,
             td {
                 padding: .5em;
+                border-bottom: none;
             }
 
             tr {
@@ -115,8 +126,6 @@ table {
         }
 
         tbody {
-            border-top: 2px solid $table-border-color;
-
             td {
                 padding: .5em;
             }
index 1fe1d67..accdad7 100644 (file)
@@ -4,6 +4,7 @@
 <input type="hidden" name="modify" value="yes" />
 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
   <table>
+    <thead>
     <tr><th></th>
         <th>Days in advance</th>
         [% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %]
@@ -12,6 +13,8 @@
         <th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="fa fa-info-circle"></i></th>
         <!-- <th>RSS</th> -->
     </tr>
+    </thead>
+    <tbody>
     [% FOREACH messaging_preference IN messaging_preferences %]
     [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
     [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
 
     </tr>
     [% END %]
+    </tbody>
   </table>
index 939257e..6f0181a 100644 (file)
 
                                 <!-- TABLE RESULTS START -->
                                 <table>
+                                    <thead>
                                     <tr>
                                         [% IF ( AmazonCoverImages  || LocalCoverImages || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
                                             <th>&nbsp;</th>
                                         <th colspan="2">Results</th>
                                         <th>Location</th>
                                     </tr>
+                                    </thead>
                                     <!-- Actual Search Results -->
                                     [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %]
+                                    <tbody>
                                     [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
                                         <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
                                             [% IF ( AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
                                             </td>
                                         </tr>
                                     [% END # /FOREACH SEARCH_RESULT %]
+                                    </tbody>
                                 </table>
                             </form>
                         </div> <!-- /#bookbag_form -->