From f3d2dd1d0ce37fca5e14a36c012a29415c4cec2c 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 Signed-off-by: Olivier V Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer (cherry picked from commit 6babf9371e543cf0f1c2be09cef8563c54579b38) Signed-off-by: Paul Derscheid --- .../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 504b005eb6..c3d1297bff 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss @@ -354,14 +354,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 ca3fb11723..389394b88a 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 @@ -256,6 +256,7 @@ [% IF servers_count > 0 %]
+

All SMTP servers

@@ -405,7 +406,7 @@ return "[% tp("Active", "On") | html %]"; } else { - return _("Off"); + return _(""); } }, "searchable": false, @@ -414,10 +415,9 @@ { "data": function( row, type, val, meta ) { if ( row.is_default ) { - return _("Yes"); - } - else { - return _("No"); + return _("Default"); + } else { + return ""; } }, "searchable": false, @@ -435,7 +435,7 @@ ], createdRow: function (row, data, dataIndex) { if ( data.is_default ) { - $(row).addClass('default warn'); + $(row).addClass('default'); } if ( data.debug ) { $(row).addClass('debug'); @@ -489,16 +489,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 %]