Tidy User list

This commit is contained in:
John Crisp 2025-04-24 11:34:16 +02:00
parent cd6c752805
commit 1a4c172969
4 changed files with 43 additions and 27 deletions

View File

@ -88,3 +88,18 @@
cursor: default; /* Prevent text cursor */
}
/* TD and buttons in user lists */
.user-td-no-right {
border-left-width: 0px;
}
.user-td-no-left {
border-left-width: 0px;
}
.user-valign-center {
text-align: center;
}

View File

@ -6,4 +6,4 @@
%= stylesheet 'dist/css/adminlte.min.css'
%= stylesheet 'dist/icons/font/bootstrap-icons.min.css'
%= stylesheet 'dist/css/overlayscrollbars.min.css'
%#= stylesheet 'dist/css/overlayscrollbars.min.css'

View File

@ -35,7 +35,7 @@
<th>
%=l 'usr_FORWARDING_ADDRESS'
</th>
<th>
<th class="user-valign-center" colspan="5">
%=l 'ACTION'
</th>
</tr>
@ -66,40 +66,40 @@
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
% my $password_text = l("PASSWORD_RESET");
%if ($useraccounts_user_name eq 'admin') {
% if ($useraccounts_user_name eq 'admin') {
%$actionModify = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$modify_text'>
% $modify_text
% </button>
%</a>&nbsp;
%</a>
%};
%$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$password_text' >
% $password_text
% </button>
%</a>&nbsp;
%</a>
%};
%} else {
% } else {
%$actionModify = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$modify_text' >
% $modify_text
% </button>
%</a>&nbsp;
%</a>
%};
%}
%if ($password_set ne 'yes') {
% }
% if ($password_set ne 'yes') {
%$actionLock = l('ACCOUNT_LOCKED');
%$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title="$password_text - currently unset" style = background:pink; >
% $password_text
% </button>
%</a>&nbsp;
%</a>
%};
%} elsif ($useraccounts_user_name ne 'admin') {
% } elsif ($useraccounts_user_name ne 'admin') {
% my $lock_text = l('ACCOUNT LOCKED'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
@ -108,17 +108,17 @@
% <button type='button' class="btn btn-primary" title='$lock_text' >
% $lock_text
% </button>
%</a>&nbsp;
%</a>
%};
%$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$password_text' >
% $password_text
% </button>
%</a>&nbsp;
%</a>
%};
%}
%if ( $removable eq 'yes' ) {
% }
% if ( $removable eq 'yes' ) {
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
%$actionRemove = qq{
@ -126,9 +126,9 @@
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
%</a>&nbsp;
%</a>
%};
%}
% }
% my $thisdomain = $c->req->url->to_abs->host;
% my $roundcube_text = l('Webmail'); # Localized text
@ -139,15 +139,13 @@
% <button type='button' class="btn btn-primary" title='$roundcube_text' >
% $roundcube_text
% </button>
%</a>&nbsp;
%</a>
%};
<td>
<%= $c->render_to_string(inline => $actionModify) %>
<%= $c->render_to_string(inline => $actionResetPw) %>
<%= $c->render_to_string(inline => $actionLock) %>
<%= $c->render_to_string(inline => $actionRemove) %>
<%= $c->render_to_string(inline => $actionroundcube) %>
</td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionResetPw) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionLock) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionRemove) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionroundcube) %></td>
</tr>
% }
</tbody>

View File

@ -1,6 +1,6 @@
%define name smeserver-manager-AdminLTE
%define version 11.0.0
%define release 11
%define release 12
Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2
Name: %{name}
Version: %{version}
@ -26,7 +26,10 @@ AdminLTE is an html framework for admin consoles
wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip
%changelog
* Wed Apr 23 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.011.sme
* Thu Apr 24 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0.12.sme
- Tidy user list
* Wed Apr 23 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-11.sme
- Working sidebar scrolling
* Sat Apr 19 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-10.sme