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

Add classes to IP addresses #5890

Open
wants to merge 1 commit into
base: 5.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions com.woltlab.wcf/templates/accountSecurity.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
{foreach from=$activeSessions item=session}
<li class="box64 sessionItem">
<div>
<span class="icon icon64 fa-{$session->getUserAgent()->getDeviceIcon()}"></span>
<span class="userAgent icon icon64 fa-{$session->getUserAgent()->getDeviceIcon()}"></span>
</div>

<div class="accountSecurityContainer">
Expand All @@ -83,7 +83,7 @@
<dd>{if $session->isCurrentSession()}{lang}wcf.user.security.currentSession{/lang}{else}{@$session->getLastActivityTime()|time}{/if}</dd>

<dt>{lang}wcf.user.security.ipAddress{/lang}</dt>
<dd title="{$session->getIpAddress()}">{$session->getIpAddress()->toBulletMasked(16, 48)}</dd>
<dd class="ipAddress" title="{$session->getIpAddress()}">{$session->getIpAddress()->toBulletMasked(16, 48)}</dd>
</dl>
</div>

Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/user.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
{if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if}
{/if}
{if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress}
<li>{lang}wcf.user.registrationIpAddress{/lang}: <span class="userRegistrationIpAddress">{@$user->getRegistrationIpAddress()|ipSearch}</span></li>
<li class="ipAddress">{lang}wcf.user.registrationIpAddress{/lang}: <span class="userRegistrationIpAddress">{@$user->getRegistrationIpAddress()|ipSearch}</span></li>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've overseen that there is already a span with an appropriate class. However, adding a class to the surrounding element doesn't hurt :)

{/if}
{/content}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions com.woltlab.wcf/templates/usersOnlineList.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
{if $__wcf->session->getPermission('admin.user.canViewIpAddress')}
<dl class="plain inlineDataList small">
<dt>{lang}wcf.user.usersOnline.ipAddress{/lang}</dt>
<dd title="{$user->getFormattedIPAddress()}">{@$user->getFormattedIPAddress()|ipSearch}</dd>
<dd class="ipAddress" title="{$user->getFormattedIPAddress()}">{@$user->getFormattedIPAddress()|ipSearch}</dd>

{if !$user->spiderID}
<dt>{lang}wcf.user.usersOnline.userAgent{/lang}</dt>
<dd title="{$user->userAgent}">{$user->getBrowser()|truncate:30}</dd>
<dd class="userAgent" title="{$user->userAgent}">{$user->getBrowser()|truncate:30}</dd>
{/if}
</dl>
{/if}
Expand Down