Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show last activity in user card #6147

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions com.woltlab.wcf/templates/userCard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,27 @@
{/hascontent}

{event name='afterButtons'}

{hascontent}
<div class="userCard__details">
<dl class="plain dataList">
{content}
{event name='beforeDetails'}

{if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
<dt>{lang}wcf.user.usersOnline.lastActivity{/lang}</dt>
<dd>{time time=$user->getLastActivityTime()}</dd>
{if $user->getCurrentLocation()}
<dt>{lang}wcf.user.usersOnline.location{/lang}</dt>
<dd>{unsafe:$user->getCurrentLocation()}</dd>
{/if}
{/if}

{event name='afterDetails'}
{/content}
</dl>
</div>
{/hascontent}
</div>

{hascontent}
Expand Down
6 changes: 6 additions & 0 deletions wcfsetup/install/files/style/ui/userCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
}
}

.userCard__details {
@include wcfFontSmall;
margin-top: auto;
padding-top: 5px;
}

.popoverContainer[data-identifier="com.woltlab.wcf.user"] {
--padding: 0;
--maxHeight: none;
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/lang/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5131,7 +5131,7 @@ Sobald {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} Benutzerkonto freige
<item name="wcf.user.usersOnline.invisible"><![CDATA[ (unsichtbar)]]></item>
<item name="wcf.user.usersOnline.marking.legend"><![CDATA[Legende]]></item>
<item name="wcf.user.usersOnline.guests"><![CDATA[Gäste]]></item>
<item name="wcf.user.usersOnline.location"><![CDATA[Ort]]></item>
<item name="wcf.user.usersOnline.location"><![CDATA[Aufenthaltsort]]></item>
<item name="wcf.user.usersOnline.ipAddress"><![CDATA[IP-Adresse]]></item>
<item name="wcf.user.usersOnline.userAgent"><![CDATA[Browser]]></item>
<item name="wcf.user.usersOnline.lastActivity"><![CDATA[Letzte Aktivität]]></item>
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5130,7 +5130,7 @@ You also received a list of backup codes to use when your second factor becomes
<item name="wcf.user.usersOnline.invisible"><![CDATA[ (invisible)]]></item>
<item name="wcf.user.usersOnline.marking.legend"><![CDATA[Legend]]></item>
<item name="wcf.user.usersOnline.guests"><![CDATA[Guests]]></item>
<item name="wcf.user.usersOnline.location"><![CDATA[Location]]></item>
<item name="wcf.user.usersOnline.location"><![CDATA[Page Viewing]]></item>
<item name="wcf.user.usersOnline.ipAddress"><![CDATA[IP Address]]></item>
<item name="wcf.user.usersOnline.userAgent"><![CDATA[Browser]]></item>
<item name="wcf.user.usersOnline.lastActivity"><![CDATA[Last Activity]]></item>
Expand Down
Loading