Re-add user profile meta to the profile header
authorMarcel Werk <burntime@woltlab.com>
Sat, 4 Jan 2025 13:03:39 +0000 (14:03 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 4 Jan 2025 13:03:39 +0000 (14:03 +0100)
com.woltlab.wcf/templates/userProfileAbout.tpl
com.woltlab.wcf/templates/userProfileHeader.tpl
wcfsetup/install/files/style/ui/userProfileHeader.scss
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 840463503d8f34b173c312c2db78b00b664742d1..bcf9db8681adbd51edd661a28b7cb4e59178701c 100644 (file)
@@ -1,31 +1,3 @@
-{capture assign='miscInformation'}
-       <dl>
-               <dt>{lang}wcf.user.registrationDate{/lang}</dt>
-               <dd>{time time=$user->registrationDate type='plainDate'}</dd>
-       </dl>
-       {if $user->getOldUsername()}
-               <dl>
-                       <dt>{lang}wcf.user.oldUsername{/lang}</dt>
-                       <dd>{$user->getOldUsername()}</dd>
-               </dl>
-       {/if}
-       {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
-               <dl>
-                       <dt>{lang}wcf.user.usersOnline.lastActivity{/lang}</dt>
-                       <dd>
-                               {time time=$user->getLastActivityTime()}
-                               {if $user->getCurrentLocation()}<br>{unsafe:$user->getCurrentLocation()}{/if}
-                       </dd>
-               </dl>
-       {/if}
-       {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress}
-               <dl>
-                       <dt>{lang}wcf.user.registrationIpAddress{/lang}</dt>
-                       <dd>{unsafe:$user->getRegistrationIpAddress()|ipSearch}</dd>
-               </dl>
-       {/if}
-{/capture}
-
 {hascontent}
        {content}
                {event name='beforeUserOptions'}
                        {/foreach}
                {/foreach}
 
-               {if $miscInformation|trim}
-                       <section class="section">
-                               <h2 class="sectionTitle">{lang}wcf.user.profile.miscInformation{/lang}</h2>
-                               
-                               {unsafe:$miscInformation}
-                       </section>
-               {/if}
-
                {event name='afterUserOptions'}
        {/content}
 {hascontentelse}
index 399042ad8c8b961c5d4191278d95ba6f2217b8c1..a30f1f6de95a7c9e08ffdd2439eddcf17ae4b09a 100644 (file)
 
                        {event name='afterButtons'}
                </div>
+
+               <div class="userProfileHeader__meta">
+                       <dl class="plain userProfileHeader__meta__dataList">
+                               {event name='beforeMeta'}
+
+                               <dt>{icon name='calendar'} {lang}wcf.user.registrationDate{/lang}</dt>
+                               <dd>{time time=$view->user->registrationDate type='plainDate'}</dd>
+                               {if $view->user->getOldUsername()}
+                                       <dt>{icon name='scroll'} {lang}wcf.user.oldUsername{/lang}</dt>
+                                       <dd>{$view->user->getOldUsername()}</dd>
+                               {/if}
+                               {if $view->user->canViewOnlineStatus() && $view->user->getLastActivityTime()}
+                                       <dt>{icon name='clock'} {lang}wcf.user.usersOnline.lastActivity{/lang}</dt>
+                                       <dd>{time time=$view->user->getLastActivityTime()}</dd>
+                                       {if $user->getCurrentLocation()}
+                                               <dt>{icon name='location-arrow'} {lang}wcf.user.usersOnline.location{/lang}</dt>
+                                               <dd>{unsafe:$user->getCurrentLocation()}</dd>
+                                       {/if}
+                               {/if}
+                               {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $view->user->registrationIpAddress}
+                                       <dt>{icon name='network-wired'} {lang}wcf.user.registrationIpAddress{/lang}</dt>
+                                       <dd>{unsafe:$view->user->getRegistrationIpAddress()|ipSearch}</dd>
+                               {/if}
+
+                               {event name='afterMeta'}
+                       </dl>
+               </div>
        </div>
 </header>
index 2b6ee17c8b6b4dacacc07b5abdbb5102fc68e36c..4d4be6dcd9646ca02e2450bcad3fad948d6d99d9 100644 (file)
@@ -150,3 +150,41 @@ body[data-page-identifier="com.woltlab.wcf.User"] .userProfileContent:first-chil
 .userProfileHeader__button {
        display: flex;
 }
+
+.userProfileHeader__meta {
+       flex: 1 0 calc(100% - 138px);
+       color: var(--wcfContentDimmedText);
+       margin-left: 138px;
+
+       @include screen-sm-down {
+               margin-left: 0;
+               flex-basis: 100%;
+       }
+}
+
+.userProfileHeader__meta__dataList {
+       @include wcfFontSmall;
+
+       > dt {
+               display: inline-block;
+               vertical-align: middle;
+
+               &:after {
+                       content: ":";
+                       padding-left: 1px;
+               }
+       }
+
+       > dd {
+               display: inline-block;
+               vertical-align: middle;
+
+               &:not(:last-of-type) {
+                       margin-right: 10px;
+               }
+       }
+
+       fa-icon {
+               vertical-align: middle;
+       }
+}
index cebd8555029d002b9f35afce0b6ef5a0e7064fe8..675ab03794a377f069da06a91c730d55e386a169 100644 (file)
@@ -5494,7 +5494,6 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
                <item name="wcf.user.profile.protected"><![CDATA[Der Benutzer hat den Zugriff auf sein vollständiges Profil eingeschränkt.]]></item>
                <item name="wcf.user.profile.management"><![CDATA[Verwaltung]]></item>
                <item name="wcf.user.profile.title"><![CDATA[Benutzerprofil von {$user->username}]]></item>
-               <item name="wcf.user.profile.miscInformation"><![CDATA[Sonstige Informationen]]></item>
        </category>
        <category name="wcf.user.objectWatch">
                <item name="wcf.user.objectWatch.button.subscribe"><![CDATA[Abonnieren]]></item>
index ee38d363b0afa90d5cdd0cde1f965fa2e85e9f59..ba5ee760fc1e009f43ff2c1db944d26f5f2fef0a 100644 (file)
@@ -5496,7 +5496,6 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
                <item name="wcf.user.profile.protected"><![CDATA[This member limits who may view their full profile.]]></item>
                <item name="wcf.user.profile.management"><![CDATA[Management]]></item>
                <item name="wcf.user.profile.title"><![CDATA[User profile of {$user->username}]]></item>
-               <item name="wcf.user.profile.miscInformation"><![CDATA[Miscellaneous Information]]></item>
        </category>
        <category name="wcf.user.objectWatch">
                <item name="wcf.user.objectWatch.button.subscribe"><![CDATA[Subscribe]]></item>