From 92848ab5f6f9af8f4f1dfb7b80420d42beeff855 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 10 Jul 2024 17:04:36 +0000 Subject: [PATCH] Bug 37311: Tone down the SMTP servers administration page This patch makes some structural and style changes to the SMTP servers page to show information in a way that doesn't imply that the user has to take action on it. I also added an "Edit" link to the "current default configuration" information section so that users wouldn't have to search through the list of servers to find the right edit link.. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) - Go to Administration -> SMTP servers. - If necessary, add multiple SMTP servers: - One in debug mode - One which isn't in debug mode - One which is the default - Confirm that the list of SMTP servers looks good and that it's still easy to tell which servers are in debug mode and which is the default. - Confirm that the new "Edit" link in that area works correctly. - Confirm that the display of the current default configuration looks good. - Test how this information looks when editing an existing server. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind --- .../intranet-tmpl/prog/css/src/_tables.scss | 8 ----- .../prog/en/modules/admin/smtp_servers.tt | 36 ++++++++++--------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss index c03802c4f4..5fff20c57d 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss @@ -360,14 +360,6 @@ tr { font-weight: bold; } } - - &.debug { - td { - color: #CC0000; - font-style: italic; - font-weight: bold; - } - } } .selections-table { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt index d788a726c3..871c709de0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt @@ -255,6 +255,7 @@ [% IF servers_count > 0 %]
+

All SMTP servers

@@ -404,7 +405,7 @@ return _("On"); } else { - return _("Off"); + return _(""); } }, "searchable": false, @@ -413,10 +414,9 @@ { "data": function( row, type, val, meta ) { if ( row.is_default ) { - return _("Yes"); - } - else { - return _("No"); + return _("Default"); + } else { + return ""; } }, "searchable": false, @@ -434,7 +434,7 @@ ], createdRow: function (row, data, dataIndex) { if ( data.is_default ) { - $(row).addClass('default warn'); + $(row).addClass('default'); } if ( data.debug ) { $(row).addClass('debug'); @@ -488,16 +488,20 @@ [% END %] [% BLOCK default_server_info %] -
-

Current default configuration:

- -
    -
  • Host: [%- default_config.host | html -%]
  • -
  • Port: [%- default_config.port | html -%]
  • -
  • Timeout (secs): [%- default_config.timeout | html -%]
  • -
  • SSL: [%- IF default_config.ssl_mode == 'disabled' -%]Disabled[%- ELSIF default_config.ssl_mode == 'ssl' -%]SSL[%- ELSE -%]STARTTLS[%- END -%]
  • -
  • Debug mode: [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]
  • -
+
+
+

Current default configuration

+
    +
  • Host: [%- default_config.host | html -%]
  • +
  • Port: [%- default_config.port | html -%]
  • +
  • Timeout (secs): [%- default_config.timeout | html -%]
  • +
  • SSL: [%- IF default_config.ssl_mode == 'disabled' -%]Disabled[%- ELSIF default_config.ssl_mode == 'ssl' -%]SSL[%- ELSE -%]STARTTLS[%- END -%]
  • +
  • Debug mode: [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]
  • + [% IF op == 'list' %] +
  • Edit
  • + [% END %] +
+
[% END %] -- 2.39.2