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 <david@davidnind.com>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6babf9371e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
8c312bbe8a
commit
f3d2dd1d0c
|
|
@ -354,14 +354,6 @@ tr {
|
|||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&.debug {
|
||||
td {
|
||||
color: #CC0000;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.selections-table {
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@
|
|||
|
||||
[% IF servers_count > 0 %]
|
||||
<div class="page-section">
|
||||
<h3>All SMTP servers</h3>
|
||||
<table id="smtp_servers">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -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 %]
|
||||
<div class="alert alert-info" id="default_server_message">
|
||||
<p>Current default configuration:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Host</strong>: [%- default_config.host | html -%]</li>
|
||||
<li><strong>Port</strong>: [%- default_config.port | html -%]</li>
|
||||
<li><strong>Timeout (secs)</strong>: [%- default_config.timeout | html -%]</li>
|
||||
<li><strong>SSL</strong>: [%- IF default_config.ssl_mode == 'disabled' -%]<span>Disabled</span>[%- ELSIF default_config.ssl_mode == 'ssl' -%]<span>SSL</span>[%- ELSE -%]<span>STARTTLS</span>[%- END -%]</li>
|
||||
<li><strong>Debug mode</strong>: [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]</li>
|
||||
</ul>
|
||||
<div class="page-section">
|
||||
<div class="rows" id="default_server_message">
|
||||
<h2>Current default configuration</h2>
|
||||
<ul>
|
||||
<li><span class="label">Host: </span> [%- default_config.host | html -%]</li>
|
||||
<li><span class="label">Port: </span> [%- default_config.port | html -%]</li>
|
||||
<li><span class="label">Timeout (secs): </span> [%- default_config.timeout | html -%]</li>
|
||||
<li><span class="label">SSL: </span> [%- IF default_config.ssl_mode == 'disabled' -%]<span>Disabled</span>[%- ELSIF default_config.ssl_mode == 'ssl' -%]<span>SSL</span>[%- ELSE -%]<span>STARTTLS</span>[%- END -%]</li>
|
||||
<li><span class="label">Debug mode: </span> [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]</li>
|
||||
[% IF op == 'list' %]
|
||||
<li><a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id=[% default_config.id | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue