Fix the visuals of the box for users awaiting approval
authorAlexander Ebert <ebert@woltlab.com>
Mon, 30 Dec 2024 12:40:06 +0000 (13:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 30 Dec 2024 12:40:06 +0000 (13:40 +0100)
Fixes #6141

wcfsetup/install/files/acp/style/layout.scss
wcfsetup/install/files/acp/templates/usersAwaitingApprovalAcpDashboardBox.tpl
wcfsetup/install/files/lib/system/acp/dashboard/box/UsersAwaitingApprovalAcpDashboardBox.class.php

index 271489b8bb63bb70f718de660934934ece134353..c00154d51b73b9bbe3cae54858925499377f7822 100644 (file)
@@ -1040,3 +1040,35 @@ html[data-color-scheme="dark"] {
        margin-top: 20px;
        text-align: center;
 }
+
+.acpDashboardBox__usersAwaitingApproval {
+       display: flex;
+       flex-direction: column;
+       row-gap: 10px;
+}
+
+.acpDashboardBox__usersAwaitingApproval__user {
+       position: relative;
+}
+
+.acpDashboardBox__usersAwaitingApproval__avatar {
+       align-content: center;
+}
+
+.acpDashboardBox__usersAwaitingApproval__content {
+       display: flex;
+       flex-direction: column;
+}
+
+.acpDashboardBox__usersAwaitingApproval__link::after {
+       content: "";
+       inset: 0;
+       position: absolute;
+}
+
+.acpDashboardBox__usersAwaitingApproval__meta {
+       color: var(--wcfContentDimmedText);
+       margin-top: -5px;
+
+       @include wcfFontSmall;
+}
index a2e51c4484f5b243d41ba5cfdc77a485d2b34e97..76e1ceea37021470661dcccedf80e3fef3ff86d4 100644 (file)
@@ -1,14 +1,29 @@
-<ul>
+<ul class="acpDashboardBox__usersAwaitingApproval">
        {foreach from=$users item='user'}
-               <li>
-                       <div>
-                               {@$user->getAvatar()->getImageTag(24)}
-                       </div>
-                       <div>
-                               <a title="{lang}wcf.acp.user.edit{/lang}" href="{link controller='UserEdit' id=$user->userID}{/link}">{$user->username}</a>
+               <li class="acpDashboardBox__usersAwaitingApproval__user">
+                       <div class="box24">
+                               <div class="acpDashboardBox__usersAwaitingApproval__avatar">
+                                       {unsafe:$user->getAvatar()->getImageTag(24)}
+                               </div>
+
+                               <div>
+                                       <a href="{link controller='UserEdit' id=$user->userID}{/link}"
+                                               class="acpDashboardBox__usersAwaitingApproval__link" title="{lang}wcf.acp.user.edit{/lang}">
+                                               {$user->username}
+                                       </a>
+                                       <div class="acpDashboardBox__usersAwaitingApproval__meta">
+                                               {unsafe:$user->registrationDate|time}
+                                       </div>
+                               </div>
                        </div>
                </li>
        {/foreach}
 </ul>
 
-<a href="{link controller='UserQuickSearch'}mode=pendingActivation{/link}" class="button small">More</a>
+{if $usersAwaitingApproval > $users|count}
+       <div class="acpDashboardBox__cta">
+               <a href="{link controller='UserQuickSearch' mode='pendingActivation'}{/link}" class="button small">
+                       {lang}wcf.global.button.showAll{/lang}
+               </a>
+       </div>
+{/if}
\ No newline at end of file
index b82ab73882b294343e5d4712fa0c726dc74ac437..6e5228ce3d03ab6072f96161c619eba8448407e2 100644 (file)
@@ -49,7 +49,7 @@ final class UsersAwaitingApprovalAcpDashboardBox extends AbstractAcpDashboardBox
         return WCF::getTPL()->fetch('usersAwaitingApprovalAcpDashboardBox', 'wcf', [
             'users' => $userList->getObjects(),
             'usersAwaitingApproval' => $this->getUsersAwaitingApproval(),
-        ]);
+        ], true);
     }
 
     #[\Override]
@@ -68,6 +68,7 @@ final class UsersAwaitingApprovalAcpDashboardBox extends AbstractAcpDashboardBox
             if (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_USER) {
                 $this->userList->getConditionBuilder()->add('emailConfirmed IS NULL');
             }
+            $this->userList->sqlOrderBy = 'registrationDate DESC';
         }
 
         return $this->userList;