Bug 27661: (QA follow-up) Use bootstrap classes
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 18 Feb 2021 16:56:21 +0000 (16:56 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 23 Feb 2021 12:16:07 +0000 (13:16 +0100)
This patch removes the local status_* css rules in favour of using the
bg-* rules that are shipped with the bootstrap version we are using and
then updates the relevant lines in the template to use those classes.

We also update the default table styling which adds background color to
the odd table rows so that our local classes take precidence.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

index d0fd65f..01d25fd 100644 (file)
@@ -333,8 +333,10 @@ tbody {
     tr {
         &:nth-child(odd) {
             td {
-                background-color: $table-odd-row;
                 border-right: 1px solid $table-border-color;
+                &:not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-success):not(.bg-primary) {
+                    background-color: $table-odd-row;
+                }
             }
         }
     }
index a35ca3b..0d23da0 100644 (file)
@@ -1645,18 +1645,6 @@ input[type='text']:read-only:focus {
     color: #CC0000;
 }
 
-.status_ok {
-    background-color: #90EE90 !important;
-}
-
-.status_warn {
-    background-color: #FFA500 !important;
-}
-
-.status_fatal {
-    background-color: #FF6347 !important;
-}
-
 // Font Awesome icons
 i {
     &.error {
index 460b079..e2d727a 100644 (file)
@@ -52,7 +52,7 @@
             <tr>
                 <th scope="row">Elasticsearch: </th>
             [% IF elasticsearch_fatal_config_error %]
-                <td><span class="status_warn">[% elasticsearch_fatal_config_error | html %]</span></td>
+                <td><span class="bg-warning">[% elasticsearch_fatal_config_error | html %]</span></td>
             [% ELSE %]
                 <td>
                     Version:
                     |
                     Status:
                 [% IF elasticsearch_status.running %]
-                    <span class="status_ok">running</span>
+                    <span class="bg-success">running</span>
                     |
                     Indices:
                   [% FOREACH index IN elasticsearch_status.indexes %]
                       [% index.index_name | html %] (count: <emph>[% index.count | html %]</emph>)[% UNLESS loop.last %], [% END %]
                   [% END %]
                 [% ELSE %]
-                    <span class="status_warn">not running</span>
+                    <span class="bg-warning">not running</span>
                 [% END %]
                 </td>
             [% END %]
@@ -84,9 +84,9 @@
                                [% ELSE %]<span>undefined</span>[% END %] |
                     Status: [% IF memcached_servers %]
                                 [% IF memcached_running and is_memcached_still_active %]
-                                    <span class="status_ok">running</span>.
+                                    <span class="bg-success">running</span>.
                                 [% ELSE %]
-                                    <span class="status_warn">not running</span>.
+                                    <span class="bg-warning">not running</span>.
                                     [% IF is_psgi %]
                                         <span>Remember memcached needs to be started before Plack.</span>
                                     [% END %]
                     Config read from:
                     [% SWITCH where_is_memcached_config %]
                         [% CASE 'config_only' %]
-                            <span class="status_ok">koha-conf.xml</span>
+                            <span class="bg-success">koha-conf.xml</span>
                         [% CASE 'ENV_only' %]
-                            <span class="status_warn">ENV</span> Note that the right place to define the memcached config is in your $KOHA_CONF file
+                            <span class="bg-warning">ENV</span> Note that the right place to define the memcached config is in your $KOHA_CONF file
                         [% CASE 'both' %]
-                            <span class="status_warn">ENV and koha-conf.xml</span> Note that the right place to define the memcached config is in your $KOHA_CONF file. To avoid any misunderstanding you should not export the memcached config from ENV.
+                            <span class="bg-warning">ENV and koha-conf.xml</span> Note that the right place to define the memcached config is in your $KOHA_CONF file. To avoid any misunderstanding you should not export the memcached config from ENV.
                         [% CASE # nowhere %]
-                            <span class="status_warn">Nowhere</span> Note that the right place to define the memcached config is in your $KOHA_CONF file. Currently you do not have a valid memcached configuration defined.
+                            <span class="bg-warning">Nowhere</span> Note that the right place to define the memcached config is in your $KOHA_CONF file. Currently you do not have a valid memcached configuration defined.
                     [% END %]
                   [% IF effective_caching_method != 'Cache::Memcached::Fast::Safe' %]
                     | Effective caching method: [% effective_caching_method | html %]
             <tr><th scope="row">Zebra version: </th><td>[% zebraVersion | html %]</td></tr>
             <tr><th scope="row">Zebra status: </th>
             [% IF (errZebraConnection == 10000) %]
-            <td class="status_fatal"><strong>Zebra server seems not to be available. Is it started?</strong></td>
+            <td class="bg-danger"><strong>Zebra server seems not to be available. Is it started?</strong></td>
             [% ELSIF (errZebraConnection) %]
-            <td class="status_warn"><strong>Error message from Zebra: [% ( errZebraConnection ) | html %]</strong></td>
+            <td class="bg-warning"><strong>Error message from Zebra: [% ( errZebraConnection ) | html %]</strong></td>
             [% ELSE %]
-            <td class="status_ok">Running</td>
+            <td class="bg-success">Running</td>
             [% END %]
             </tr>
             <tr>
                 <th scope="row">Message broker: </th>
                 [% IF warnConnectBroker %]
-                <td class="status_warn"><strong>Using SQL polling</strong></td>
+                <td class="bg-warning"><strong>Using SQL polling</strong></td>
                 [% ELSE %]
-                <td class="status_ok">Using RabbitMQ</td>
+                <td class="bg-success">Using RabbitMQ</td>
                 [% END %]
             </tr>
             <tr>
               <td>[% current_date_and_time | $KohaDates  with_hours => 1 %]</td>
             </tr>
             <tr>
-              [% timezone_config_class = (time_zone.config_invalid) ? 'status_warn' : '' %]
-              [% timezone_env_class    = (time_zone.env_invalid)    ? 'status_warn' : '' %]
+              [% timezone_config_class = (time_zone.config_invalid) ? 'bg-warning' : '' %]
+              [% timezone_env_class    = (time_zone.env_invalid)    ? 'bg-warning' : '' %]
               <th scope="row">Time zone: </th>
               <td>Used: <span>[% time_zone.actual | html %]</span>
                           [% IF time_zone.actual_bad_tz_fallback %]