mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
Шаблон Synio
Профиль пользователя
This commit is contained in:
parent
769dc34e81
commit
1fbaa0ac46
|
@ -10,7 +10,7 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
.ls-block + .ls-block {
|
||||
margin-top: 50px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
.ls-block:last-child {
|
||||
margin-bottom: 0;
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* Фото
|
||||
*
|
||||
* @module ls/photo
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
.ls-photo {
|
||||
position: relative;
|
||||
min-width: 100%;
|
||||
min-height: 50px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Изображение */
|
||||
.ls-photo-image {
|
||||
vertical-align: top;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Действия */
|
||||
.ls-photo-actions {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 8px 0;
|
||||
background: rgba( 0, 0, 0, .7 );
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity .3s;
|
||||
transition: opacity .3s;
|
||||
}
|
||||
.ls-photo-actions li {
|
||||
padding: 3px 15px;
|
||||
color: #bbb;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: color .2s;
|
||||
transition: color .2s;
|
||||
}
|
||||
.ls-photo-actions li:hover {
|
||||
color: #eee;
|
||||
}
|
||||
.ls-photo:hover .ls-photo-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* @modifier nophoto */
|
||||
.ls-photo--nophoto .ls-photo-image {
|
||||
width: 100%;
|
||||
}
|
||||
.ls-photo--nophoto .ls-photo-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
.ls-photo--nophoto .ls-photo-actions-crop-avatar,
|
||||
.ls-photo--nophoto .ls-photo-actions-remove {
|
||||
display: none;
|
||||
}
|
24
application/frontend/skin/synio/components/user/actions.tpl
Normal file
24
application/frontend/skin/synio/components/user/actions.tpl
Normal file
|
@ -0,0 +1,24 @@
|
|||
{**
|
||||
* Список действий
|
||||
*
|
||||
* @param object $user
|
||||
*}
|
||||
|
||||
{component_define_params params=[ 'user' ]}
|
||||
|
||||
{component 'nav'
|
||||
hook = 'user_actions'
|
||||
hookParams = [ user => $user ]
|
||||
mods = 'stacked'
|
||||
classes = 'profile-actions'
|
||||
items = [
|
||||
[ 'html' => {component 'user' template='friend-item' friendship=$user->getUserFriend() userTarget=$oUserProfile classes='js-user-friend'} ],
|
||||
[ 'url' => "{router page='talk'}add/?talk_recepient_id={$user->getId()}", 'text' => {lang 'user.actions.send_message'} ],
|
||||
[
|
||||
'url' => "#",
|
||||
'classes' => "js-user-follow {if $user->isFollow()}active{/if}",
|
||||
'attributes' => [ 'data-id' => $user->getId(), 'data-login' => $user->getLogin() ],
|
||||
'text' => {lang name="user.actions.{( $user->isFollow() ) ? 'unfollow' : 'follow'}"}
|
||||
],
|
||||
[ 'url' => "#", 'text' => {lang 'user.actions.report'}, classes => 'js-user-report', 'attributes' => [ 'data-param-target_id' => $user->getId() ] ]
|
||||
]}
|
|
@ -1,8 +1,5 @@
|
|||
/**
|
||||
* Фото пользователя
|
||||
*
|
||||
* @modifier user
|
||||
* @template blocks/block.userPhoto.tpl
|
||||
*/
|
||||
.ls-block--user-photo .ls-block-content {
|
||||
padding: 0;
|
||||
|
@ -12,71 +9,99 @@
|
|||
/* Статус (онлайн/оффлайн) */
|
||||
.user-status {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
top: 10px;
|
||||
left: 0;
|
||||
padding: 0 0 0 10px;
|
||||
font-size: 11px;
|
||||
line-height: 21px;
|
||||
height: 22px;
|
||||
z-index: 1;
|
||||
padding: 12px 15px;
|
||||
font: 300 13px/1em 'Open Sans';
|
||||
}
|
||||
.user-status:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -22px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 11px;
|
||||
border-style: solid;
|
||||
border-color: #333;
|
||||
border-color: #333 transparent #333 #333;
|
||||
}
|
||||
.user-status--online {
|
||||
background: #b7bc1c;
|
||||
background: rgba(183, 188, 28, .8);
|
||||
background: #8961e4;
|
||||
color: #fff;
|
||||
}
|
||||
.user-status--online:before {
|
||||
border-color: #8961e4 transparent #8961e4 #8961e4;
|
||||
}
|
||||
.user-status--offline {
|
||||
background: #333;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
color: #fff;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
opacity: .5;
|
||||
}
|
||||
.user-status--offline:before {
|
||||
border-color: #fff transparent #fff #fff;
|
||||
}
|
||||
|
||||
/**
|
||||
* Блок управления на странице пользователя
|
||||
*
|
||||
* @modifier user-actions
|
||||
* @template blocks/block.userActions.tpl
|
||||
*/
|
||||
.ls-block--user-actions ul { overflow: hidden; background: #fff; border: 1px solid #eee; border-radius: 5px; }
|
||||
.ls-block--user-actions ul li { margin-bottom: 0; }
|
||||
.ls-block--user-actions ul {
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
font-size: 11px;
|
||||
}
|
||||
.ls-block--user-actions .ls-nav--stacked > .ls-nav-item,
|
||||
.ls-block--user-actions ul li {
|
||||
margin-bottom: 5px;
|
||||
padding: 0 0 0 15px;
|
||||
}
|
||||
.ls-block--user-actions ul li > span,
|
||||
.ls-block--user-actions ul li a { display: block; padding: 10px 15px; color: #777; cursor: pointer; }
|
||||
.ls-block--user-actions ul li a {
|
||||
display: block;
|
||||
color: #727a90;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.ls-block--user-actions ul li > span:hover,
|
||||
.ls-block--user-actions ul li a:hover { background: #fafafa; color: #333; }
|
||||
.ls-block--user-actions ul li a.followed { color: #f00; }
|
||||
.ls-block--user-actions ul li a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
.ls-block--user-actions ul li a.followed {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
/**
|
||||
* Навигация по профилю пользователя
|
||||
*
|
||||
* @modifier user-nav
|
||||
* @template blocks/block.userNav.tpl
|
||||
*/
|
||||
.ls-nav.ls-nav--stacked.user-nav {
|
||||
overflow: hidden;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > li {
|
||||
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item {
|
||||
margin-bottom: 0;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding: 8px 10px 9px 15px;
|
||||
font-size: 15px;
|
||||
border-bottom: 1px dotted #dce1e6;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > li .ls-badge {
|
||||
background: #aaa;
|
||||
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > li a {
|
||||
padding: 11px 13px;
|
||||
display: block;
|
||||
background: #fff;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item a {
|
||||
color: #275ec2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > li a:hover {
|
||||
background: #fafafa;
|
||||
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item.active a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > li.active a {
|
||||
background: #2891D3;
|
||||
color: #fff;
|
||||
}
|
||||
.ls-nav.ls-nav--stacked.user-nav > li.active .ls-badge {
|
||||
background: #2379B0;
|
||||
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item .ls-badge {
|
||||
background: transparent;
|
||||
color: #333;
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
}
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
.user-profile {
|
||||
position: relative;
|
||||
padding: 30px;
|
||||
margin: -40px -40px 30px -40px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.user-profile-user {
|
||||
|
@ -23,16 +20,15 @@
|
|||
width: 70px;
|
||||
height: 70px;
|
||||
margin: 0 18px 0 0;
|
||||
border-radius: 100px;
|
||||
border-radius: 5px;
|
||||
background: #fff;
|
||||
border: 4px solid #fff;
|
||||
box-shadow: 0 0 5px rgba(0,0,0,.2);
|
||||
}
|
||||
.user-profile--is-online .user-profile-user-avatar {
|
||||
background: #b7bc1c;
|
||||
}
|
||||
|
||||
/* Логин и имя */
|
||||
.user-profile-user-body {
|
||||
float: left;
|
||||
padding-top: 18px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
.user-profile--has-name .user-profile-user-body {
|
||||
padding-top: 7px;
|
||||
|
@ -52,32 +48,48 @@
|
|||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
.user-profile-user-name {
|
||||
color: #aaa;
|
||||
color: rgba(0, 0, 0, .5);
|
||||
font-size: 17px;
|
||||
color: #949aa1;
|
||||
font-family: "PT Sans";
|
||||
}
|
||||
.user-profile-user-login,
|
||||
.user-profile-user-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
}
|
||||
|
||||
/* Рейтинг */
|
||||
.user-profile-rating {
|
||||
position: absolute;
|
||||
top: 46px;
|
||||
right: 40px;
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
text-align: right;
|
||||
color: rgba(0, 0, 0, .8);
|
||||
top: 20px;
|
||||
right: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
.user-profile-rating-label {
|
||||
color: rgba(0, 0, 0, .4);
|
||||
font-size: 10px;
|
||||
text-transform: lowercase;
|
||||
color: #aaa;
|
||||
}
|
||||
.user-profile-rating-value {
|
||||
font: 300 24px/1em "Open Sans", sans-serif;
|
||||
height: 24px;
|
||||
padding: 0 10px;
|
||||
margin-bottom: 0px;
|
||||
font-size: 11px;
|
||||
line-height: 1em;
|
||||
text-align: center;
|
||||
line-height: 23px;
|
||||
background: #def7dc;
|
||||
color: #5fa459;
|
||||
border-radius: 15px;
|
||||
-webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, .1) inset;
|
||||
box-shadow: 0 2px 3px rgba(0, 0, 0, .1) inset;
|
||||
}
|
||||
.user-profile-rating--negative .user-profile-rating-value {
|
||||
background: #ff8a8a;
|
||||
color: #da4242;
|
||||
-webkit-box-shadow: 0 2px 3px #e95e5e inset;
|
||||
box-shadow: 0 2px 3px #e95e5e inset;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,23 @@
|
|||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* О себе */
|
||||
.user-info-group.user-info-about {
|
||||
padding: 17px 20px 20px 20px;
|
||||
background: #fcfce9;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 30px;
|
||||
color: #000;
|
||||
position: relative;
|
||||
}
|
||||
.user-info-about .user-info-group-title {
|
||||
font-size: 19px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.user-info-about-empty-text {
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
/* Список */
|
||||
.user-info-group-items .info-list-item-label { width: 150px; }
|
||||
.user-info-group-items .info-list-item { margin-bottom: 10px; }
|
||||
|
|
55
application/frontend/skin/synio/components/user/header.tpl
Normal file
55
application/frontend/skin/synio/components/user/header.tpl
Normal file
|
@ -0,0 +1,55 @@
|
|||
{**
|
||||
* Шапка профиля
|
||||
*}
|
||||
|
||||
{$component = 'user-profile'}
|
||||
{component_define_params params=[ 'user', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
{if $user->getProfileName()}
|
||||
{$mods = "{$mods} has-name"}
|
||||
{/if}
|
||||
|
||||
{if $user->isOnline()}
|
||||
{$mods = "{$mods} is-online"}
|
||||
{/if}
|
||||
|
||||
<div class="{$component} {cmods name=$component mods=$mods} {$classes} ls-clearfix" {cattr list=$attributes}>
|
||||
{* @hook Начало шапки с информацией о пользователе *}
|
||||
{hook run='user_header_begin' user=$user}
|
||||
|
||||
{* Пользователь *}
|
||||
<div class="{$component}-user ls-clearfix">
|
||||
<a href="{$user->getUserWebPath()}">
|
||||
<img src="{$user->getProfileAvatarPath(100)}" alt="{$user->getProfileName()}" class="{$component}-user-avatar js-user-profile-avatar" itemprop="photo">
|
||||
</a>
|
||||
|
||||
<div class="{$component}-user-body">
|
||||
<h2 class="{$component}-user-login" itemprop="nickname">
|
||||
<a href="{$user->getUserWebPath()}">
|
||||
{$user->getLogin()}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
{if $user->getProfileName()}
|
||||
<p class="{$component}-user-name" itemprop="name">
|
||||
{$user->getProfileName()|escape}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Рейтинг *}
|
||||
|
||||
{* @hook Рейтинг пользователя *}
|
||||
{hookb run='user_rating' user=$user}
|
||||
{$_rating = $user->getRating()}
|
||||
|
||||
<div class="{$component}-rating {if $_rating < 0}{$component}-rating--negative{/if}">
|
||||
<div class="{$component}-rating-value">{$_rating}</div>
|
||||
<div class="{$component}-rating-label">Рейтинг</div>
|
||||
</div>
|
||||
{/hookb}
|
||||
|
||||
{* @hook Конец шапки с информацией о пользователе *}
|
||||
{hook run='user_header_end' user=$user}
|
||||
</div>
|
245
application/frontend/skin/synio/components/user/info.tpl
Normal file
245
application/frontend/skin/synio/components/user/info.tpl
Normal file
|
@ -0,0 +1,245 @@
|
|||
{**
|
||||
* Информация о пользователе
|
||||
*
|
||||
* @param object $user
|
||||
* @param array usersInvited
|
||||
* @param object invitedByUser
|
||||
* @param array blogsJoined
|
||||
* @param array blogsModerate
|
||||
* @param array blogsAdminister
|
||||
* @param array blogsCreated
|
||||
* @param array usersFriend
|
||||
*}
|
||||
|
||||
{component_define_params params=[ 'blogsAdminister', 'blogsCreated', 'blogsJoined', 'blogsModerate', 'friends', 'invitedByUser', 'user', 'usersInvited', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
{$session = $user->getSession()}
|
||||
{$geoTarget = $user->getGeoTarget()}
|
||||
|
||||
{* @hook Начало информации о пользователе *}
|
||||
{hook run='user_info_begin' user=$user}
|
||||
|
||||
{**
|
||||
* О себе
|
||||
*}
|
||||
|
||||
{capture 'user_info_about'}
|
||||
{if $user->getProfileAbout()}
|
||||
<div class="ls-text">
|
||||
{$user->getProfileAbout()}
|
||||
</div>
|
||||
{else}
|
||||
<div class="user-info-about-empty-text">Пока ничего не известно...</div>
|
||||
{/if}
|
||||
{/capture}
|
||||
|
||||
{component 'user.info-group' classes='user-info-about' title={lang 'user.profile.about.title'} html=$smarty.capture.user_info_about}
|
||||
|
||||
|
||||
{**
|
||||
* Личное
|
||||
*}
|
||||
{$items = []}
|
||||
{$userfields = $user->getUserFieldValues(true, array(''))}
|
||||
|
||||
{* Пол *}
|
||||
{if $user->getProfileSex() != 'other'}
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.personal.gender'},
|
||||
'content' => "{if $user->getProfileSex() == 'man'}{lang name='user.profile.personal.gender_male'}{else}{lang name='user.profile.personal.gender_female'}{/if}"
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* День рождения *}
|
||||
{if $user->getProfileBirthday()}
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.personal.birthday'},
|
||||
'content' => {date_format date=$user->getProfileBirthday() format="j F Y" notz=true}
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Местоположение *}
|
||||
{if $geoTarget}
|
||||
{capture 'info_private_geo'}
|
||||
<span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">
|
||||
{if $geoTarget->getCountryId()}
|
||||
<a href="{router page='people'}country/{$geoTarget->getCountryId()}/" itemprop="country-name">{$user->getProfileCountry()|escape}</a>{if $geoTarget->getCityId()},{/if}
|
||||
{/if}
|
||||
|
||||
{if $geoTarget->getCityId()}
|
||||
<a href="{router page='people'}city/{$geoTarget->getCityId()}/" itemprop="locality">{$user->getProfileCity()|escape}</a>
|
||||
{/if}
|
||||
</span>
|
||||
{/capture}
|
||||
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.personal.place'},
|
||||
'content' => $smarty.capture.info_private_geo
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{component 'user.info-group' title={lang name='user.profile.personal.title'} items=$items}
|
||||
|
||||
|
||||
{**
|
||||
* Контакты
|
||||
*}
|
||||
{$items = []}
|
||||
{$userfields = $user->getUserFieldValues(true, array('contact'))}
|
||||
|
||||
{foreach $userfields as $field}
|
||||
{$items[] = [
|
||||
'label' => $field->getTitle()|escape,
|
||||
'content' => $field->getValue(true, true)
|
||||
]}
|
||||
{/foreach}
|
||||
|
||||
{component 'user.info-group' name='contact' title={lang name='user.profile.contact'} items=$items}
|
||||
|
||||
|
||||
{**
|
||||
* Соц. сети
|
||||
*}
|
||||
{$items = []}
|
||||
{$userfields = $user->getUserFieldValues(true, array('social'))}
|
||||
|
||||
{foreach $userfields as $field}
|
||||
{$items[] = [
|
||||
'label' => $field->getTitle()|escape,
|
||||
'content' => $field->getValue(true, true)
|
||||
]}
|
||||
{/foreach}
|
||||
|
||||
{component 'user.info-group' name='social-networks' title={lang name='user.profile.social_networks'} items=$items}
|
||||
|
||||
|
||||
|
||||
{**
|
||||
* Активность
|
||||
*}
|
||||
{$items = []}
|
||||
|
||||
{* Кто пригласил пользователя *}
|
||||
{if $invitedByUser}
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.activity.invited_by'},
|
||||
'content' => "<a href=\"{$invitedByUser->getUserWebPath()}\">{$invitedByUser->getDisplayName()}</a>"
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Приглашенные пользователем *}
|
||||
{if $usersInvited}
|
||||
{$users = ''}
|
||||
|
||||
{foreach $usersInvited as $userInvited}
|
||||
{$users = $users|cat:"<a href=\"{$userInvited->getUserWebPath()}\">{$userInvited->getDisplayName()}</a> "}
|
||||
{/foreach}
|
||||
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.activity.invited'},
|
||||
'content' => $users
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Блоги созданные пользователем *}
|
||||
{if $blogsCreated}
|
||||
{$blogs = ''}
|
||||
|
||||
{foreach $blogsCreated as $blog}
|
||||
{$blogs = $blogs|cat:"<a href=\"{$blog->getUrlFull()}\">{$blog->getTitle()|escape}</a>{if ! $blog@last}, {/if}"}
|
||||
{/foreach}
|
||||
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.activity.blogs_created'},
|
||||
'content' => $blogs
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Блоги администрируемые пользователем *}
|
||||
{if $blogsAdminister}
|
||||
{$blogs = ''}
|
||||
|
||||
{foreach $blogsAdminister as $blogUser}
|
||||
{$blog = $blogUser->getBlog()}
|
||||
{$blogs = $blogs|cat:"<a href=\"{$blog->getUrlFull()}\">{$blog->getTitle()|escape}</a>{if ! $blogUser@last}, {/if}"}
|
||||
{/foreach}
|
||||
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.activity.blogs_admin'},
|
||||
'content' => $blogs
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Блоги модерируемые пользователем *}
|
||||
{if $blogsModerate}
|
||||
{$blogs = ''}
|
||||
|
||||
{foreach $blogsModerate as $blogUser}
|
||||
{$blog = $blogUser->getBlog()}
|
||||
{$blogs = $blogs|cat:"<a href=\"{$blog->getUrlFull()}\">{$blog->getTitle()|escape}</a>{if ! $blogUser@last}, {/if}"}
|
||||
{/foreach}
|
||||
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.activity.blogs_mod'},
|
||||
'content' => $blogs
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Блоги в которые вступил пользователь *}
|
||||
{if $blogsJoined}
|
||||
{$blogs = ''}
|
||||
|
||||
{foreach $blogsJoined as $blogUser}
|
||||
{$blog = $blogUser->getBlog()}
|
||||
{$blogs = $blogs|cat:"<a href=\"{$blog->getUrlFull()}\">{$blog->getTitle()|escape}</a>{if ! $blogUser@last}, {/if}"}
|
||||
{/foreach}
|
||||
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.profile.activity.blogs_joined'},
|
||||
'content' => $blogs
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Дата регистрации *}
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.date_registration'},
|
||||
'content' => {date_format date=$user->getDateRegister()}
|
||||
]}
|
||||
|
||||
{* Дата последнего визита *}
|
||||
{if $session}
|
||||
{$items[] = [
|
||||
'label' => {lang name='user.date_last_session'},
|
||||
'content' => {date_format date=$session->getDateLast()}
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{component 'user.info-group' name='activity' title={lang name='user.profile.activity.title'} items=$items}
|
||||
|
||||
{**
|
||||
* Друзья
|
||||
*}
|
||||
{if $friends}
|
||||
{capture 'user_info_friends'}
|
||||
{component 'user.avatar-list' users=$friends}
|
||||
{/capture}
|
||||
|
||||
{component 'user.info-group'
|
||||
title = "<a href=\"{$user->getUserWebPath()}friends/\">{$aLang.user.friends.title}</a> ({$iCountFriendsUser})"
|
||||
html = $smarty.capture.user_info_friends}
|
||||
{/if}
|
||||
|
||||
{**
|
||||
* Стена
|
||||
*}
|
||||
{capture 'user_info_wall'}
|
||||
{insert name='block' block='wall' params=[
|
||||
'classes' => 'js-wall-default',
|
||||
'user_id' => $user->getId()
|
||||
]}
|
||||
{/capture}
|
||||
|
||||
{component 'user.info-group' name='wall' title={lang name='wall.title'} html=$smarty.capture.user_info_wall}
|
||||
|
||||
{* @hook Конец информации о пользователе *}
|
||||
{hook run='user_info_end' user=$user}
|
14
application/frontend/skin/synio/components/user/nav.user.tpl
Normal file
14
application/frontend/skin/synio/components/user/nav.user.tpl
Normal file
|
@ -0,0 +1,14 @@
|
|||
{**
|
||||
* Навигация на странице пользователя
|
||||
*}
|
||||
|
||||
{component 'nav' hook='user_profile' activeItem=$sMenuProfileItemSelect mods='stacked' classes='user-nav' hookParams=[ 'oUserProfile' => $oUserProfile ] items=[
|
||||
[ 'name' => 'whois', 'text' => {lang name='user.profile.nav.info'}, 'url' => "{$oUserProfile->getUserWebPath()}" ],
|
||||
[ 'name' => 'wall', 'text' => {lang name='user.profile.nav.wall'}, 'url' => "{$oUserProfile->getUserWebPath()}wall/", 'count' => $iCountWallUser ],
|
||||
[ 'name' => 'created', 'text' => {lang name='user.profile.nav.publications'}, 'url' => "{$oUserProfile->getUserWebPath()}created/topics/", 'count' => $iCountCreated ],
|
||||
[ 'name' => 'favourites', 'text' => {lang name='user.profile.nav.favourite'}, 'url' => "{$oUserProfile->getUserWebPath()}favourites/topics/", 'count' => $iCountFavourite ],
|
||||
[ 'name' => 'friends', 'text' => {lang name='user.profile.nav.friends'}, 'url' => "{$oUserProfile->getUserWebPath()}friends/", 'count' => $iCountFriendsUser ],
|
||||
[ 'name' => 'activity', 'text' => {lang name='user.profile.nav.activity'}, 'url' => "{$oUserProfile->getUserWebPath()}stream/" ],
|
||||
[ 'name' => 'talk', 'text' => {lang name='user.profile.nav.messages'}, 'url' => "{router page='talk'}", 'count' => $iUserCurrentCountTalkNew, 'is_enabled' => $oUserCurrent && $oUserCurrent->getId() == $oUserProfile->getId() ],
|
||||
[ 'name' => 'settings', 'text' => {lang name='user.profile.nav.settings'}, 'url' => "{router page='settings'}", 'is_enabled' => $oUserCurrent && $oUserCurrent->getId() == $oUserProfile->getId() ]
|
||||
]}
|
|
@ -51,7 +51,18 @@ $config['block']['rule_index_blog'] = array(
|
|||
'blogs' => array('params' => array(), 'priority' => 1)
|
||||
)
|
||||
),
|
||||
'clear' => false,
|
||||
'clear' => false
|
||||
);
|
||||
$config['block']['rule_profile'] = array(
|
||||
'action' => array('profile', 'talk', 'settings'),
|
||||
'blocks' => array(
|
||||
'right' => array(
|
||||
'component@user.block.photo' => array('priority' => 100),
|
||||
'component@user.block.nav' => array('priority' => 50),
|
||||
'component@user.block.note' => array('priority' => 25),
|
||||
'component@user.block.actions' => array('priority' => 1),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Подключение скриптов шаблона
|
||||
|
|
Loading…
Reference in a new issue