1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-05 02:18:18 +03:00
ifhub.club/application/frontend/components/user/list/user-list-item.tpl
2015-04-17 23:21:45 +07:00

40 lines
1.3 KiB
Smarty

{if $user->getUser()}
{$user = $user->getUser()}
{/if}
{* Заголовок *}
{capture 'title'}
<a href="{$user->getUserWebPath()}">{$user->getDisplayName()}</a>
{/capture}
{* Описание *}
{capture 'content'}
{$session = $user->getSession()}
{$usernote = $user->getUserNote()}
{* Заметка *}
{if $usernote}
{component 'note' classes='js-user-note' note=$usernote targetId=$user->getId()}
{/if}
{* Информация *}
{if $session}
{$lastSessionDate = {date_format date=$session->getDateLast() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}}
{/if}
{component 'info-list' classes='object-list-item-info' list=[
[ 'label' => "{$aLang.user.date_last_session}:", 'content' => ( $session ) ? $lastSessionDate : '&mdash;' ],
[ 'label' => "{$aLang.user.date_registration}:", 'content' => {date_format date=$user->getDateRegister() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"} ],
[ 'label' => "{$aLang.vote.rating}:", 'content' => $user->getRating() ]
]}
{/capture}
{component 'item'
title=$smarty.capture.title
content=$smarty.capture.content
image=[
'url' => $user->getUserWebPath(),
'path' => $user->getProfileAvatarPath( 100 ),
'alt' => $user->getLogin()
]}