From 15c6c8b2b9ff057cd24d9920670b25761c1c9267 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 4 Jan 2025 14:03:39 +0100 Subject: [PATCH] Re-add user profile meta to the profile header --- .../templates/userProfileAbout.tpl | 36 ------------------ .../templates/userProfileHeader.tpl | 27 +++++++++++++ .../files/style/ui/userProfileHeader.scss | 38 +++++++++++++++++++ wcfsetup/install/lang/de.xml | 1 - wcfsetup/install/lang/en.xml | 1 - 5 files changed, 65 insertions(+), 38 deletions(-) diff --git a/com.woltlab.wcf/templates/userProfileAbout.tpl b/com.woltlab.wcf/templates/userProfileAbout.tpl index 840463503d..bcf9db8681 100644 --- a/com.woltlab.wcf/templates/userProfileAbout.tpl +++ b/com.woltlab.wcf/templates/userProfileAbout.tpl @@ -1,31 +1,3 @@ -{capture assign='miscInformation'} -
-
{lang}wcf.user.registrationDate{/lang}
-
{time time=$user->registrationDate type='plainDate'}
-
- {if $user->getOldUsername()} -
-
{lang}wcf.user.oldUsername{/lang}
-
{$user->getOldUsername()}
-
- {/if} - {if $user->canViewOnlineStatus() && $user->getLastActivityTime()} -
-
{lang}wcf.user.usersOnline.lastActivity{/lang}
-
- {time time=$user->getLastActivityTime()} - {if $user->getCurrentLocation()}
{unsafe:$user->getCurrentLocation()}{/if} -
-
- {/if} - {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress} -
-
{lang}wcf.user.registrationIpAddress{/lang}
-
{unsafe:$user->getRegistrationIpAddress()|ipSearch}
-
- {/if} -{/capture} - {hascontent} {content} {event name='beforeUserOptions'} @@ -45,14 +17,6 @@ {/foreach} {/foreach} - {if $miscInformation|trim} -
-

{lang}wcf.user.profile.miscInformation{/lang}

- - {unsafe:$miscInformation} -
- {/if} - {event name='afterUserOptions'} {/content} {hascontentelse} diff --git a/com.woltlab.wcf/templates/userProfileHeader.tpl b/com.woltlab.wcf/templates/userProfileHeader.tpl index 399042ad8c..a30f1f6de9 100644 --- a/com.woltlab.wcf/templates/userProfileHeader.tpl +++ b/com.woltlab.wcf/templates/userProfileHeader.tpl @@ -159,5 +159,32 @@ {event name='afterButtons'} + +
+
+ {event name='beforeMeta'} + +
{icon name='calendar'} {lang}wcf.user.registrationDate{/lang}
+
{time time=$view->user->registrationDate type='plainDate'}
+ {if $view->user->getOldUsername()} +
{icon name='scroll'} {lang}wcf.user.oldUsername{/lang}
+
{$view->user->getOldUsername()}
+ {/if} + {if $view->user->canViewOnlineStatus() && $view->user->getLastActivityTime()} +
{icon name='clock'} {lang}wcf.user.usersOnline.lastActivity{/lang}
+
{time time=$view->user->getLastActivityTime()}
+ {if $user->getCurrentLocation()} +
{icon name='location-arrow'} {lang}wcf.user.usersOnline.location{/lang}
+
{unsafe:$user->getCurrentLocation()}
+ {/if} + {/if} + {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $view->user->registrationIpAddress} +
{icon name='network-wired'} {lang}wcf.user.registrationIpAddress{/lang}
+
{unsafe:$view->user->getRegistrationIpAddress()|ipSearch}
+ {/if} + + {event name='afterMeta'} +
+
diff --git a/wcfsetup/install/files/style/ui/userProfileHeader.scss b/wcfsetup/install/files/style/ui/userProfileHeader.scss index 2b6ee17c8b..4d4be6dcd9 100644 --- a/wcfsetup/install/files/style/ui/userProfileHeader.scss +++ b/wcfsetup/install/files/style/ui/userProfileHeader.scss @@ -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; + } +} diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index cebd855502..675ab03794 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -5494,7 +5494,6 @@ Benachrichtigungen auf {PAGE_TITLE|phra username}]]> - diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index ee38d363b0..ba5ee760fc 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -5496,7 +5496,6 @@ your notifications on {PAGE_TITLE|phras username}]]> - -- 2.20.1