Show last activity in user card
authorMarcel Werk <burntime@woltlab.com>
Fri, 20 Dec 2024 14:34:06 +0000 (15:34 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 20 Dec 2024 14:34:06 +0000 (15:34 +0100)
com.woltlab.wcf/templates/userCard.tpl
wcfsetup/install/files/style/ui/userCard.scss
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index baa13e251f0437ef12fef50220db7392d379b742..deee068de19caecc70e0ceae36a0743086584b0f 100644 (file)
                {/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}
index 92291c780fe6a37e1456d3f89a8660cb37b03a37..70f3a3e367df957c73a29639a547b3976ea806f5 100644 (file)
        }
 }
 
+.userCard__details {
+       @include wcfFontSmall;
+       margin-top: auto;
+       padding-top: 5px;
+}
+
 .popoverContainer[data-identifier="com.woltlab.wcf.user"] {
        --padding: 0;
        --maxHeight: none;
index 13e4b84f09398428fae71a015a67df4570ebd8f1..710a8b76ef949cdcfc658922032f6ba967ec6181 100644 (file)
@@ -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>
index 770ce9fd83273162226248a63884963f345d63a7..cfdcb026b50e22f8841b5c89e6ec11d1e25d40e7 100644 (file)
@@ -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>