1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-28 20:45:00 +03:00

отображение даты последнего визита пользователя в списке "Онлайн"

This commit is contained in:
Mzhelskiy Maxim 2012-07-26 15:27:30 +04:00
parent c3df2d65d2
commit 38fd2dfc38
2 changed files with 48 additions and 1 deletions

View file

@ -1,5 +1,51 @@
{include file='header.tpl' menu='people'}
{include file='user_list.tpl' aUsersList=$aUsersLast}
<table class="table table-users">
<thead>
<tr>
<th class="cell-name cell-tab"><div class="cell-tab-inner">{$aLang.user}</div></th>
<th>&nbsp;</th>
<th class="cell-date cell-tab"><div class="cell-tab-inner active"><span>{$aLang.user_date_last}</span></div></th>
<th class="cell-rating cell-tab">{$aLang.user_rating}</th>
</tr>
</thead>
<tbody>
{if $aUsersLast}
{foreach from=$aUsersLast item=oUserList}
{assign var="oSession" value=$oUserList->getSession()}
<tr>
<td class="cell-name">
<a href="{$oUserList->getUserWebPath()}"><img src="{$oUserList->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<div class="name {if !$oUserList->getProfileName()}no-realname{/if}">
<p class="username word-wrap"><a href="{$oUserList->getUserWebPath()}">{$oUserList->getLogin()}</a></p>
{if $oUserList->getProfileName()}<p class="realname">{$oUserList->getProfileName()}</p>{/if}
</div>
</td>
<td>
{if $oUserCurrent}
<a href="{router page='talk'}add/?talk_users={$oUserList->getLogin()}"><button type="submit" class="button button-action button-action-send-message"><i class="icon-synio-send-message"></i><span>{$aLang.user_write_prvmsg}</span></button></a>
{/if}
</td>
<td>
{if $oSession}
{date_format date=$oSession->getDateLast() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F, H:i"}
{/if}
</td>
<td class="cell-rating {if $oUserList->getRating() < 0}negative{/if}"><strong>{$oUserList->getRating()}</strong></td>
</tr>
{/foreach}
{else}
<tr>
<td colspan="4">
{$aLang.user_empty}
</td>
</tr>
{/if}
</tbody>
</table>
{include file='paging.tpl' aPaging=$aPaging}
{include file='footer.tpl'}

View file

@ -71,6 +71,7 @@
.table.table-users tbody .cell-date { font-size: 11px; }
.table.table-users .cell-rating { text-align: center; width: 70px; }
.table.table-users .cell-skill { text-align: center; width: 70px; }
.table.table-users .cell-date { text-align: center; width: 130px; }
.table.table-users tbody .cell-skill { color: #628fa5; font-size: 11px; font-weight: bold; }
.table.table-users tbody .cell-rating { color: #5fa459; font-size: 11px; }
.table.table-users button { float: left; margin-right: 5px; }