mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 14:50:48 +03:00
Совместимость с новыми версиями компонентов
This commit is contained in:
parent
33074894f0
commit
cf273dbd47
|
@ -486,7 +486,7 @@ $config['block']['rule_blog'] = array(
|
|||
$config['components'] = array(
|
||||
// Базовые компоненты
|
||||
'css-reset', 'css-helpers', 'typography', 'forms', 'grid', 'ls-vendor', 'ls-core', 'ls-component', 'accordion', 'alert', 'dropdown', 'button', 'block',
|
||||
'nav', 'tooltip', 'tabs', 'modal', 'table', 'text', 'uploader', 'field', 'comment', 'pagination', 'editor', 'more', 'crop',
|
||||
'nav', 'tooltip', 'tabs', 'modal', 'table', 'text', 'uploader', 'email', 'field', 'comment', 'pagination', 'editor', 'more', 'crop',
|
||||
'perfomance', 'toolbar', 'media', 'actionbar', 'progressbar', 'badge', 'property', 'autocomplete', 'icon', 'item', 'highlighter', 'jumbotron',
|
||||
|
||||
// Компоненты LS CMS
|
||||
|
|
|
@ -2,30 +2,21 @@
|
|||
* Последняя активность
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_title'}
|
||||
<a href="{router page='stream'}">{lang 'activity.block_recent.title'}</a>
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} stream nopadding"}
|
||||
{$classes = "{$classes} js-block-default"}
|
||||
{/block}
|
||||
|
||||
{* Навигация *}
|
||||
{block 'block_content'}
|
||||
{**
|
||||
* TODO: Выпадающее меню
|
||||
* Показывается если в меню что выше пунктов больше установленного значения (по умолчанию - 2)
|
||||
*}
|
||||
{component 'tabs' classes='js-tabs-block js-activity-block-recent-tabs' tabs=[
|
||||
[ 'text' => {lang 'activity.block_recent.comments'}, 'url' => "{router page='ajax'}stream/comment", 'content' => $smarty.local.content ],
|
||||
[ 'text' => {lang 'activity.block_recent.topics'}, 'url' => "{router page='ajax'}stream/topic" ]
|
||||
]}
|
||||
{/block}
|
||||
|
||||
{* Подвал *}
|
||||
{block 'block_footer'}
|
||||
{capture 'block_footer'}
|
||||
<a href="{router page='rss'}allcomments/">{lang 'activity.block_recent.feed'}</a>
|
||||
{/block}
|
||||
{/capture}
|
||||
|
||||
{component 'block'
|
||||
mods = 'primary activity-recent'
|
||||
classes = 'js-block-default'
|
||||
title = {lang 'activity.block_recent.title'}
|
||||
titleUrl = {router 'stream'}
|
||||
footer = $smarty.capture.block_footer
|
||||
tabs = [
|
||||
'classes' => 'js-tabs-block js-activity-block-recent-tabs',
|
||||
'tabs' => [
|
||||
[ 'text' => {lang 'activity.block_recent.comments'}, 'url' => "{router page='ajax'}stream/comment", 'list' => $smarty.local.content ],
|
||||
[ 'text' => {lang 'activity.block_recent.topics'}, 'url' => "{router page='ajax'}stream/topic" ]
|
||||
]
|
||||
]}
|
|
@ -2,16 +2,7 @@
|
|||
* Блок настройки ленты активности
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.activity.settings.title}
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} activity-settings"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include '../settings.tpl' typesActive=$typesActive types=$types}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'activity-settings'
|
||||
title = {lang 'activity.settings.title'}
|
||||
content = {include '../settings.tpl' typesActive=$typesActive types=$types}}
|
|
@ -2,16 +2,7 @@
|
|||
* Выбор пользователей для чтения в ленте активности
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.activity.users.title}
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} activity-users"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include '../users.tpl' users=$users}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'activity-users'
|
||||
title = {lang 'activity.users.title'}
|
||||
content = {include '../users.tpl' users=$users}}
|
|
@ -3,30 +3,17 @@
|
|||
* Топики отсортированные по времени последнего комментария
|
||||
*}
|
||||
|
||||
<div class="block-content">
|
||||
<ul class="block-item-list">
|
||||
{foreach $smarty.local.comments as $comment}
|
||||
{$user = $comment->getUser()}
|
||||
{$topic = $comment->getTarget()}
|
||||
{$blog = $topic->getBlog()}
|
||||
{capture 'items'}
|
||||
{foreach $smarty.local.comments as $comment}
|
||||
{$topic = $comment->getTarget()}
|
||||
|
||||
<li class="js-title-comment" title="{$comment->getText()|strip_tags|trim|truncate:100:'...'|escape}">
|
||||
<a href="{$user->getUserWebPath()}"><img src="{$user->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
|
||||
{include './recent-item.tpl'
|
||||
user = $comment->getUser()
|
||||
topic = $topic
|
||||
blog = $topic->getBlog()
|
||||
date = $comment->getDate()
|
||||
topicUrl = ( Config::Get('module.comment.use_nested') ) ? {router 'comments'} : "{$topic->getUrl()}#comment{$comment->getId()}"}
|
||||
{/foreach}
|
||||
{/capture}
|
||||
|
||||
<a href="{$user->getUserWebPath()}" class="author">{$user->getDisplayName()}</a> →
|
||||
<a href="{$blog->getUrlFull()}" class="blog-name">{$blog->getTitle()|escape}</a> →
|
||||
<a href="{if Config::Get('module.comment.nested_per_page')}{router page='comments'}{else}{$topic->getUrl()}#comment{/if}{$comment->getId()}">
|
||||
{$topic->getTitle()|escape}
|
||||
</a>
|
||||
|
||||
<p>
|
||||
<time datetime="{date_format date=$comment->getDate() format='c'}">
|
||||
{date_format date=$comment->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y"}
|
||||
</time> |
|
||||
|
||||
{lang name='comments.comments_declension' count=$topic->getCountComment() plural=true}
|
||||
</p>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{component 'item' template='group' items=$smarty.capture.items}
|
|
@ -0,0 +1,22 @@
|
|||
{capture 'item_content'}
|
||||
<a href="{$user->getUserWebPath()}" class="author">{$user->getDisplayName()}</a> →
|
||||
<a href="{$blog->getUrlFull()}" class="blog-name">{$blog->getTitle()|escape}</a> →
|
||||
<a href="{$smarty.local.topicUrl}">{$topic->getTitle()|escape}</a>
|
||||
|
||||
<p>
|
||||
<time datetime="{date_format date=$smarty.local.date format='c'}">
|
||||
{date_format date=$smarty.local.date hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y"}
|
||||
</time> |
|
||||
|
||||
{lang 'comments.comments_declension' count=$topic->getCountComment() plural=true}
|
||||
</p>
|
||||
{/capture}
|
||||
|
||||
{component 'item'
|
||||
element = 'li'
|
||||
mods = 'image-rounded'
|
||||
desc = $smarty.capture.item_content
|
||||
image=[
|
||||
'path' => $user->getProfileAvatarPath(48),
|
||||
'url' => $user->getUserWebPath()
|
||||
]}
|
|
@ -3,27 +3,15 @@
|
|||
* Последние топики
|
||||
*}
|
||||
|
||||
<div class="block-content">
|
||||
<ul class="block-item-list">
|
||||
{foreach $smarty.local.topics as $topic}
|
||||
{$user = $topic->getUser()}
|
||||
{$blog = $topic->getBlog()}
|
||||
{capture 'items'}
|
||||
{foreach $smarty.local.topics as $topic}
|
||||
{include './recent-item.tpl'
|
||||
user = $topic->getUser()
|
||||
topic = $topic
|
||||
blog = $topic->getBlog()
|
||||
date = $topic->getDateAdd()
|
||||
topicUrl = $topic->getUrl()}
|
||||
{/foreach}
|
||||
{/capture}
|
||||
|
||||
<li class="js-title-topic" title="{$topic->getText()|strip_tags|trim|truncate:150:'...'|escape}">
|
||||
<a href="{$user->getUserWebPath()}"><img src="{$user->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
|
||||
|
||||
<a href="{$user->getUserWebPath()}" class="author">{$user->getDisplayName()}</a> →
|
||||
<a href="{$blog->getUrlFull()}" class="blog-name">{$blog->getTitle()|escape}</a> →
|
||||
<a href="{$topic->getUrl()}">{$topic->getTitle()|escape}</a>
|
||||
|
||||
<p>
|
||||
<time datetime="{date_format date=$topic->getDate() format='c'}">
|
||||
{date_format date=$topic->getDateAdd() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y"}
|
||||
</time> |
|
||||
|
||||
{lang name='comments.comments_declension' count=$topic->getCountComment() plural=true}
|
||||
</p>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{component 'item' template='group' items=$smarty.capture.items}
|
|
@ -13,28 +13,25 @@
|
|||
.activity-event-list {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
/* Дата-заголовок */
|
||||
.activity-date {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 20px;
|
||||
margin-top: 45px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
font: 400 18px/1.3em 'Open Sans', sans-serif;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
}
|
||||
.activity-event + .activity-date {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Событие
|
||||
*/
|
||||
.activity-event {
|
||||
margin-bottom: 5px;
|
||||
min-height: 48px;
|
||||
background: #fafafa;
|
||||
padding: 15px 15px 15px 75px;
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
}
|
||||
.activity-event-avatar {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
.activity-event + .activity-event {
|
||||
border-top: 1px solid #f2f2f2;
|
||||
}
|
||||
.activity-event-date {
|
||||
display: block;
|
||||
|
@ -43,9 +40,8 @@
|
|||
}
|
||||
.activity-event-text {
|
||||
padding: 10px 15px;
|
||||
background: #fff;
|
||||
border: 1px solid #eee;
|
||||
border-bottom-color: #ddd;
|
||||
margin-top: 10px;
|
||||
color: #777;
|
||||
background: #fafafa;
|
||||
font-size: 13px;
|
||||
}
|
|
@ -4,40 +4,4 @@
|
|||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*
|
||||
* TODO: Component item
|
||||
*/
|
||||
|
||||
.block-item-list li {
|
||||
min-height: 51px;
|
||||
padding: 17px 15px 20px 80px;
|
||||
border-top: 1px solid #eee;
|
||||
position: relative;
|
||||
zoom: 1;
|
||||
background: #fff;
|
||||
}
|
||||
.block-item-list li:first-child {
|
||||
border: none;
|
||||
}
|
||||
.block-item-list li p {
|
||||
margin: 0;
|
||||
padding-top: 2px;
|
||||
font-size: 11px;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.block-item-list li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.block-item-list li .avatar {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.block-item-list li .author {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
.block-item-list li .blog-name {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -25,12 +25,7 @@
|
|||
|
||||
|
||||
{* Событие *}
|
||||
<li class="{$component} {$component}--{$type} js-{$component}">
|
||||
{* Аватар *}
|
||||
<a href="{$user->getUserWebPath()}">
|
||||
<img src="{$user->getProfileAvatarPath(48)}" alt="{$user->getDisplayName()}" class="activity-event-avatar" />
|
||||
</a>
|
||||
|
||||
{capture 'event_content'}
|
||||
{* Дата *}
|
||||
<time datetime="{date_format date=$event->getDateAdded() format='c' notz=1}"
|
||||
class="{$component}-date"
|
||||
|
@ -85,4 +80,15 @@
|
|||
{else}
|
||||
{hook run="activity_event_`$type`" event=$event}
|
||||
{/if}
|
||||
</li>
|
||||
{/capture}
|
||||
|
||||
{component 'item'
|
||||
element='li'
|
||||
classes="{$component} {cmods name=$component mods=$type}"
|
||||
mods='image-rounded'
|
||||
desc=$smarty.capture.event_content
|
||||
image=[
|
||||
'url' => $user->getUserWebPath(),
|
||||
'path' => $user->getProfileAvatarPath(48),
|
||||
'alt' => $user->getDisplayName()
|
||||
]}
|
|
@ -47,7 +47,7 @@
|
|||
{component 'button' name='submit_blog_admin' text=$aLang.common.save mods='primary'}
|
||||
</form>
|
||||
|
||||
{component 'pagination' paging=$smarty.local.pagination}
|
||||
{component 'pagination' total=+$paging.iCountPage current=+$paging.iCurrentPage url="{$paging.sBaseUrl}/page__page__/{$paging.sGetParams}"}
|
||||
{else}
|
||||
{component 'alert' text=$aLang.blog.admin.alerts.empty mods='empty'}
|
||||
{/if}
|
|
@ -4,14 +4,7 @@
|
|||
* TODO: Уни-ать список экшенов
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{* TODO: Fix styles *}
|
||||
{$mods = "{$mods} nopadding transparent user-actions"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{capture 'block_content'}
|
||||
<ul class="profile-actions" id="profile_actions">
|
||||
{* Список экшенов *}
|
||||
{$actions = []}
|
||||
|
@ -75,4 +68,8 @@
|
|||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/block}
|
||||
{/capture}
|
||||
|
||||
{component 'block'
|
||||
mods = 'nopadding transparent user-actions'
|
||||
content = $smarty.capture.block_content}
|
|
@ -2,24 +2,18 @@
|
|||
* Блок с кнопкой добавления блога
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
{if $oUserCurrent}
|
||||
{capture 'block_content'}
|
||||
{if $oUserCurrent && ($oUserCurrent->getRating() > Config::Get('acl.create.blog.rating') or $oUserCurrent->isAdministrator())}
|
||||
<p>{$aLang.blog.can_add}</p>
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-add"}
|
||||
{component 'button' url="{router page='blog'}add/" mods='primary large' text=$aLang.blog.create_blog}
|
||||
{else}
|
||||
<p>{lang name='blog.cant_add' rating=Config::Get('acl.create.blog.rating')}</p>
|
||||
|
||||
{if ! $oUserCurrent}
|
||||
{$show = false}
|
||||
{/if}
|
||||
{/block}
|
||||
{component 'button' mods='primary large' text=$aLang.blog.create_blog isDisabled=true}
|
||||
{/if}
|
||||
{/capture}
|
||||
|
||||
{block 'block_content'}
|
||||
{if $oUserCurrent && ($oUserCurrent->getRating() > Config::Get('acl.create.blog.rating') or $oUserCurrent->isAdministrator())}
|
||||
<p>{$aLang.blog.can_add}</p>
|
||||
|
||||
{component 'button' url="{router page='blog'}add/" mods='primary large' text=$aLang.blog.create_blog}
|
||||
{else}
|
||||
<p>{lang name='blog.cant_add' rating=Config::Get('acl.create.blog.rating')}</p>
|
||||
|
||||
{component 'button' mods='primary large' text=$aLang.blog.create_blog isDisabled=true}
|
||||
{/if}
|
||||
{/block}
|
||||
{component 'block' mods='blog-add' content=$smarty.capture.block_content}
|
||||
{/if}
|
|
@ -2,17 +2,7 @@
|
|||
* Список управляющих блога
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.blog.administrators}
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-admins"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{capture 'block_content'}
|
||||
{* Создатель *}
|
||||
{component 'user' template='list-small' users=[ $blog->getOwner() ] title=$aLang.blog.owner}
|
||||
|
||||
|
@ -25,4 +15,9 @@
|
|||
{if count($blogModerators)}
|
||||
{component 'user' template='list-small' users=$blogModerators title="{$aLang.blog.moderators} ({count($blogModerators)})"}
|
||||
{/if}
|
||||
{/block}
|
||||
{/capture}
|
||||
|
||||
{component 'block'
|
||||
mods = 'blog-admins'
|
||||
title = {lang 'blog.administrators'}
|
||||
content = $smarty.capture.block_content}
|
|
@ -2,16 +2,7 @@
|
|||
* Подсказка отображаемая при создании топика
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-info-note"}
|
||||
{/block}
|
||||
|
||||
{block 'block_title'}
|
||||
{lang 'topic.blocks.tip.title'}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{lang 'topic.blocks.tip.text'}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'info'
|
||||
title = {lang 'topic.blocks.tip.title'}
|
||||
content = {lang 'topic.blocks.tip.text'}}
|
|
@ -3,19 +3,13 @@
|
|||
* Выводится на странице администрирования пользователей закрытого блога.
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
{component 'blog' template='invite'
|
||||
users = $blogUsersInvited
|
||||
classes = 'js-user-list-add-blog-invite'
|
||||
attributes = [ 'data-param-target_id' => $blogEdit->getId() ]
|
||||
assign = blockContent}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.blog.invite.invite_users}
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-invite"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{component 'blog' template='invite'
|
||||
users = $blogUsersInvited
|
||||
classes = 'js-user-list-add-blog-invite'
|
||||
attributes = [ 'data-param-target_id' => $blogEdit->getId() ]}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'blog-invite'
|
||||
title = {lang 'blog.invite.invite_users'}
|
||||
content = $blockContent}
|
|
@ -1,23 +1,18 @@
|
|||
{**
|
||||
*
|
||||
* Аватара блога
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
{component 'photo'
|
||||
classes = 'js-blog-avatar'
|
||||
useAvatar = false
|
||||
hasPhoto = $blog->getAvatar()
|
||||
editable = $blog->isAllowEdit()
|
||||
targetId = $blog->getId()
|
||||
url = $blog->getUrlFull()
|
||||
photoPath = $blog->getAvatarPath(500)
|
||||
photoAltText = $blog->getTitle()|escape
|
||||
assign = blockContent}
|
||||
|
||||
{block 'block_type'}blog-actions{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-actions"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{component 'photo'
|
||||
classes = 'js-blog-avatar'
|
||||
useAvatar = false
|
||||
hasPhoto = $blog->getAvatar()
|
||||
editable = $blog->isAllowEdit()
|
||||
targetId = $blog->getId()
|
||||
url = $blog->getUrlFull()
|
||||
photoPath = $blog->getAvatarPath(500)
|
||||
photoAltText = $blog->getTitle()|escape}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'nopadding transparent blog-actions'
|
||||
content = $blockContent}
|
|
@ -2,24 +2,18 @@
|
|||
* Список пользователей блога
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_title'}
|
||||
{capture 'block_title'}
|
||||
{$usersCount = count($blogUsers)}
|
||||
|
||||
<a href="{$blog->getUrlFull()}users/">
|
||||
{if $usersCount}
|
||||
{$usersCount} {$usersCount|declension:$aLang.blog.readers_declension:'russian'}
|
||||
{else}
|
||||
{$aLang.blog.users.empty}
|
||||
{/if}
|
||||
</a>
|
||||
{/block}
|
||||
{if $usersCount}
|
||||
{$usersCount} {lang "{$smarty.local.titleLang|default:'blog.readers_declension'}" count=$usersCount plural=true}
|
||||
{else}
|
||||
{$aLang.blog.users.empty}
|
||||
{/if}
|
||||
{/capture}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-users"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{component 'user' template='list-avatar' users=$blogUsers}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'blog-users'
|
||||
title = $smarty.capture.block_title
|
||||
titleUrl = "{$blog->getUrlFull()}users/"
|
||||
content = {component 'user' template='list-avatar' users=$blogUsers}}
|
|
@ -2,17 +2,7 @@
|
|||
* Фильтр блогов
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_title'}
|
||||
{lang 'blog.blocks.search.title'}
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blogs-search"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{capture 'block_content'}
|
||||
<h3>{lang 'blog.blocks.search.categories.title'}</h3>
|
||||
|
||||
{* Категории *}
|
||||
|
@ -66,4 +56,9 @@
|
|||
{component 'field' template='radio' inputClasses='js-search-ajax-blog-relation' name='blog_search_relation' value='my' label='Мои'}
|
||||
{component 'field' template='radio' inputClasses='js-search-ajax-blog-relation' name='blog_search_relation' value='join' label='Читаю'}
|
||||
</div>
|
||||
{/block}
|
||||
{/capture}
|
||||
|
||||
{component 'block'
|
||||
mods = 'blogs-search'
|
||||
title = {lang 'blog.blocks.search.title'}
|
||||
content = $smarty.capture.block_content}
|
|
@ -2,21 +2,16 @@
|
|||
* Блок со списком блогов
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blogs nopadding"}
|
||||
{$classes = "{$classes} js-block-default"}
|
||||
{/block}
|
||||
|
||||
{block 'block_title'}
|
||||
<a href="{router page='blogs'}">{lang 'blog.blocks.blogs.title'}</a>
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{component 'tabs' classes='js-tabs-block' tabs=[
|
||||
[ 'text' => {lang 'blog.blocks.blogs.nav.top'}, 'url' => "{router page='ajax'}blogs/top", 'content' => $sBlogsTop ],
|
||||
[ 'text' => {lang 'blog.blocks.blogs.nav.joined'}, 'url' => "{router page='ajax'}blogs/join", 'is_enabled' => !! $oUserCurrent ],
|
||||
[ 'text' => {lang 'blog.blocks.blogs.nav.self'}, 'url' => "{router page='ajax'}blogs/self", 'is_enabled' => !! $oUserCurrent ]
|
||||
]}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'blogs'
|
||||
classes = 'blog-block-blogs js-block-default'
|
||||
title = {lang 'blog.blocks.blogs.title'}
|
||||
titleUrl = {router page='blogs'}
|
||||
tabs = [
|
||||
'classes' => 'js-tabs-block',
|
||||
'tabs' => [
|
||||
[ 'text' => {lang 'blog.blocks.blogs.nav.top'}, 'url' => "{router page='ajax'}blogs/top", 'list' => $sBlogsTop ],
|
||||
[ 'text' => {lang 'blog.blocks.blogs.nav.joined'}, 'url' => "{router page='ajax'}blogs/join", 'is_enabled' => !! $oUserCurrent ],
|
||||
[ 'text' => {lang 'blog.blocks.blogs.nav.self'}, 'url' => "{router page='ajax'}blogs/self", 'is_enabled' => !! $oUserCurrent ]
|
||||
]
|
||||
]}
|
|
@ -1,25 +1,27 @@
|
|||
{**
|
||||
* Блок со списоком блогов
|
||||
* Список блогов
|
||||
*
|
||||
* TODO: Component item
|
||||
*}
|
||||
|
||||
<ul class="block-item-list">
|
||||
{foreach $aBlogs as $blog}
|
||||
<li>
|
||||
<a href="{$blog->getUrlFull()}">
|
||||
<img src="{$blog->getAvatarPath(48)}" alt="{$blog->getTitle()|escape}" class="avatar" />
|
||||
</a>
|
||||
{$items = []}
|
||||
|
||||
{if $blog->getType() == 'close'}
|
||||
<i title="{lang 'blog.blocks.blogs.item.private'}" class="icon icon-lock"></i>
|
||||
{/if}
|
||||
{foreach $aBlogs as $blog}
|
||||
{capture 'item_content'}
|
||||
{lang 'blog.users.readers_total'}: <strong>{$blog->getCountUser()}</strong><br>
|
||||
{lang 'blog.topics_total'}: <strong>{$blog->getCountTopic()}</strong>
|
||||
{/capture}
|
||||
|
||||
<a href="{$blog->getUrlFull()}">{$blog->getTitle()|escape}</a>
|
||||
{$items[] = [
|
||||
'title' => $blog->getTitle()|escape,
|
||||
'titleUrl' => $blog->getUrlFull(),
|
||||
'mods' => $blog->getUrlFull(),
|
||||
'content' => $smarty.capture.item_content,
|
||||
'image' => [
|
||||
'path' => $blog->getAvatarPath(48),
|
||||
'url' => $blog->getUrlFull(),
|
||||
'alt' => $blog->getTitle()|escape
|
||||
]
|
||||
]}
|
||||
{/foreach}
|
||||
|
||||
<p>{lang 'blog.users.readers_total'}: <strong>{$blog->getCountUser()}</strong></p>
|
||||
<p>{lang 'blog.topics_total'}: <strong>{$blog->getCountTopic()}</strong></p>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{component 'item' template='group' items=$items}
|
|
@ -4,56 +4,50 @@
|
|||
* @param object $blog
|
||||
*}
|
||||
|
||||
{extends 'Component@item.item'}
|
||||
|
||||
{block 'options' append}
|
||||
{$blog = $smarty.local.blog}
|
||||
{$blog = $smarty.local.blog}
|
||||
|
||||
{* Заголовок *}
|
||||
{capture 'blog_list_item_title'}
|
||||
{if $blog->getType() == 'close'}
|
||||
<i title="{$aLang.blog.private}" class="icon-lock"></i>
|
||||
{/if}
|
||||
{* Заголовок *}
|
||||
{capture 'title'}
|
||||
{if $blog->getType() == 'close'}
|
||||
<i title="{$aLang.blog.private}" class="icon-lock"></i>
|
||||
{/if}
|
||||
|
||||
<a href="{$blog->getUrlFull()}">{$blog->getTitle()|escape}</a>
|
||||
{/capture}
|
||||
<a href="{$blog->getUrlFull()}">{$blog->getTitle()|escape}</a>
|
||||
{/capture}
|
||||
|
||||
{$title = $smarty.capture.blog_list_item_title}
|
||||
{* Описание *}
|
||||
{capture 'desc'}
|
||||
{$blog->getDescription()|strip_tags|truncate:120}
|
||||
{/capture}
|
||||
|
||||
{* Описание *}
|
||||
{capture 'blog_list_item_desc'}
|
||||
{$blog->getDescription()|strip_tags|truncate:120}
|
||||
{/capture}
|
||||
{* Описание *}
|
||||
{capture 'content'}
|
||||
{* Действия *}
|
||||
<div class="blog-list-item-actions">
|
||||
{* Вступить/покинуть блог *}
|
||||
{include './join.tpl' blog=$blog}
|
||||
</div>
|
||||
|
||||
{$desc = $smarty.capture.blog_list_item_desc}
|
||||
{* Информация *}
|
||||
{$info = [
|
||||
[ 'label' => "{$aLang.blog.users.readers_total}:", 'content' => "<span class=\"js-blog-users-count\" data-blog-id=\"{$blog->getId()}\">{$blog->getCountUser()}</span>" ],
|
||||
[ 'label' => "{$aLang.blog.topics_total}:", 'content' => $blog->getCountTopic() ]
|
||||
]}
|
||||
|
||||
{* Описание *}
|
||||
{capture 'blog_list_item_content'}
|
||||
{* Информация *}
|
||||
{$info = [
|
||||
[ 'label' => "{$aLang.blog.users.readers_total}:", 'content' => "<span class=\"js-blog-users-count\" data-blog-id=\"{$blog->getId()}\">{$blog->getCountUser()}</span>" ],
|
||||
[ 'label' => "{$aLang.blog.topics_total}:", 'content' => $blog->getCountTopic() ]
|
||||
]}
|
||||
{if $blog->category->getCategory()}
|
||||
{$info[] = [ 'label' => "{$aLang.blog.categories.category}:", 'content' => $blog->category->getCategory()->getTitle() ]}
|
||||
{/if}
|
||||
|
||||
{if $blog->category->getCategory()}
|
||||
{$info[] = [ 'label' => "{$aLang.blog.categories.category}:", 'content' => $blog->category->getCategory()->getTitle() ]}
|
||||
{/if}
|
||||
{component 'info-list' list=$info classes='object-list-item-info'}
|
||||
{/capture}
|
||||
|
||||
{component 'info-list' list=$info classes='object-list-item-info'}
|
||||
|
||||
{* Действия *}
|
||||
<div class="blog-list-item-actions">
|
||||
{* Вступить/покинуть блог *}
|
||||
{include './join.tpl' blog=$blog}
|
||||
</div>
|
||||
{/capture}
|
||||
|
||||
{$content = $smarty.capture.blog_list_item_content}
|
||||
|
||||
{* Изображение *}
|
||||
{$image = [
|
||||
{component 'item'
|
||||
title=$smarty.capture.title
|
||||
desc=$smarty.capture.desc
|
||||
content=$smarty.capture.content
|
||||
image=[
|
||||
'url' => $blog->getUrlFull(),
|
||||
'path' => $blog->getAvatarPath( 100 ),
|
||||
'alt' => $blog->getTitle()|escape
|
||||
]}
|
||||
{/block}
|
||||
]}
|
|
@ -10,17 +10,21 @@
|
|||
*}
|
||||
|
||||
{if $smarty.local.blogs}
|
||||
{$paging = $smarty.local.pagination}
|
||||
|
||||
{* Заголовок *}
|
||||
{if $smarty.local.searchCount}
|
||||
<h3 class="h3">{lang name='blog.search.result_title' count=$smarty.local.searchCount plural=true}</h3>
|
||||
{/if}
|
||||
|
||||
{* Список блогов *}
|
||||
<ul class="object-list object-list-actions blog-list js-more-blogs-container">
|
||||
{capture 'blog_list'}
|
||||
{foreach $smarty.local.blogs as $blog}
|
||||
{include './blog-list-item.tpl' blog=$blog}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/capture}
|
||||
|
||||
{component 'item' template='group' classes='js-more-blogs-container' items=$smarty.capture.blog_list}
|
||||
|
||||
{* Кнопка подгрузки *}
|
||||
{if $smarty.local.useMore}
|
||||
|
@ -31,7 +35,7 @@
|
|||
ajaxParams = [ 'next_page' => 2 ]}
|
||||
{/if}
|
||||
{else}
|
||||
{component 'pagination' paging=$smarty.local.pagination}
|
||||
{component 'pagination' total=+$paging.iCountPage current=+$paging.iCurrentPage url="{$paging.sBaseUrl}/page__page__/{$paging.sGetParams}"}
|
||||
{/if}
|
||||
{else}
|
||||
{component 'alert' text=(($smarty.local.textEmpty) ? $smarty.local.textEmpty : $aLang.blog.alerts.empty) mods='empty'}
|
||||
|
|
|
@ -4,26 +4,20 @@
|
|||
* @modifier blog-add
|
||||
* @template blocks/block.blog-add.tpl
|
||||
*/
|
||||
.block--blog-add .block-content { padding: 30px; text-align: center; }
|
||||
.block--blog-add p { margin-bottom: 25px; }
|
||||
|
||||
.block--blog-add .block-content {
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/**
|
||||
* Навигация по блогам
|
||||
* Список блогов
|
||||
*
|
||||
* @modifier blog-navigation
|
||||
* @template blocks/block.blog-nav.tpl
|
||||
* @template blocks/block.blogs.tpl
|
||||
*/
|
||||
.block--blog-navigation p { margin-bottom: 15px; }
|
||||
.block--blog-navigation .blog-navigator-categories option:first-child { color: #aaa; }
|
||||
|
||||
|
||||
/**
|
||||
* Информация о блоге
|
||||
*
|
||||
* @modifier blog-actions
|
||||
* @template blocks/block.blog-actions.tpl
|
||||
*/
|
||||
.block--blog-actions .block-content { padding: 0; }
|
||||
.block--blog-actions .avatar { max-width: 100%; vertical-align: top; }
|
||||
.block--blog-actions .block-footer { text-align: center; }
|
||||
.block.blog-block-blogs .item-title {
|
||||
font-size: 16px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
.block.blog-block-blogs .item-image {
|
||||
border-radius: 3px;
|
||||
}
|
|
@ -2,16 +2,7 @@
|
|||
* Выбор блогов для чтения в ленте
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} feed-blogs"}
|
||||
{/block}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.feed.blogs.title}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include '../blogs.tpl' blogsJoined=$blogsJoined blogsSubscribed=$blogsSubscribed}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'feed-blogs'
|
||||
title = {lang 'feed.blogs.title'}
|
||||
content = {include '../blogs.tpl' blogsJoined=$blogsJoined blogsSubscribed=$blogsSubscribed}}
|
|
@ -2,16 +2,7 @@
|
|||
* Выбор пользователей для чтения в ленте
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} feed-users"}
|
||||
{/block}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.feed.users.title}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include '../users.tpl' users=$users}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'feed-users'
|
||||
title = {lang 'feed.users.title'}
|
||||
content = {include '../users.tpl' users=$users}}
|
|
@ -128,4 +128,4 @@
|
|||
{component 'alert' text=$aLang.talk.notices.empty mods='empty'}
|
||||
{/if}
|
||||
|
||||
{component 'pagination' paging=$smarty.local.paging}
|
||||
{component 'pagination' total=+$paging.iCountPage current=+$paging.iCurrentPage url="{$paging.sBaseUrl}/page__page__/{$paging.sGetParams}"}
|
|
@ -6,6 +6,7 @@
|
|||
*}
|
||||
|
||||
{$topics = $smarty.local.topics}
|
||||
{$paging = $smarty.local.paging}
|
||||
|
||||
{if $topics}
|
||||
{add_block group='toolbar' name='component@toolbar-scrollnav.toolbar.scrollnav' show=count( $topics )}
|
||||
|
@ -14,7 +15,7 @@
|
|||
{include './topic-type.tpl' topic=$topic isList=true}
|
||||
{/foreach}
|
||||
|
||||
{component 'pagination' paging=$smarty.local.paging classes='js-pagination-topics'}
|
||||
{component 'pagination' total=+$paging.iCountPage current=+$paging.iCurrentPage url="{$paging.sBaseUrl}/page__page__/{$paging.sGetParams}" classes='js-pagination-topics'}
|
||||
{else}
|
||||
{component 'alert' text=$aLang.common.empty mods='empty'}
|
||||
{/if}
|
|
@ -1,19 +1,9 @@
|
|||
{**
|
||||
* Меню пользователя ("Добавить в друзья", "Написать письмо" и т.д.)
|
||||
*
|
||||
* @styles css/blocks.css
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} nopadding transparent user-actions"}
|
||||
|
||||
{if ! $oUserCurrent or ( $oUserCurrent && $oUserCurrent->getId() == $oUserProfile->getId() )}
|
||||
{$show = false}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{component 'user' template='actions' user=$oUserProfile}
|
||||
{/block}
|
||||
{if $oUserCurrent && $oUserCurrent->getId() != $oUserProfile->getId() }
|
||||
{component 'block'
|
||||
mods = 'nopadding transparent user-actions'
|
||||
content = {component 'user' template='actions' user=$oUserProfile}}
|
||||
{/if}
|
|
@ -1,15 +1,5 @@
|
|||
{**
|
||||
* Блок с навигацией по профилю пользователя
|
||||
*
|
||||
* @styles css/blocks.css
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} nopadding transparent user-nav"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content_after'}
|
||||
{include 'navs/nav.user.tpl'}
|
||||
{/block}
|
||||
{component 'block' mods='nopadding transparent user-nav' content={include 'navs/nav.user.tpl'}}
|
|
@ -1,19 +1,9 @@
|
|||
{**
|
||||
* Блок с заметкой о пользователе
|
||||
*
|
||||
* @styles css/blocks.css
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} user-note nopadding transparent"}
|
||||
|
||||
{if ! $oUserCurrent or ( $oUserCurrent->getId() == $oUserProfile->getId() )}
|
||||
{$show = false}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block 'block_content_after'}
|
||||
{component 'note' classes='js-user-note' note=$oUserProfile->getUserNote() targetId=$oUserProfile->getId()}
|
||||
{/block}
|
||||
{if $oUserCurrent && $oUserCurrent->getId() != $oUserProfile->getId() }
|
||||
{component 'block'
|
||||
mods = 'nopadding transparent user-note'
|
||||
content = {component 'note' classes='js-user-note' note=$oUserProfile->getUserNote() targetId=$oUserProfile->getId()}}
|
||||
{/if}
|
|
@ -2,14 +2,7 @@
|
|||
* Блок с фотографией пользователя в профиле
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} user-photo"}
|
||||
{$classes = "{$classes} js-ajax-photo-upload"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{capture 'block_content'}
|
||||
{$session = $oUserProfile->getSession()}
|
||||
|
||||
{* Статус онлайн\оффлайн *}
|
||||
|
@ -37,4 +30,8 @@
|
|||
url = $oUserProfile->getUserWebPath()
|
||||
photoPath = $oUserProfile->getProfileFotoPath()
|
||||
photoAltText = $oUserProfile->getDisplayName()}
|
||||
{/block}
|
||||
{/capture}
|
||||
|
||||
{component 'block'
|
||||
mods = 'user-photo'
|
||||
content = $smarty.capture.block_content}
|
|
@ -2,17 +2,7 @@
|
|||
* Статистика по пользователям
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} users-search"}
|
||||
{/block}
|
||||
|
||||
{block 'block_title'}
|
||||
Поиск по пользователям
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{capture 'block_content'}
|
||||
{* Сейчас на сайте *}
|
||||
{component 'field' template='checkbox'
|
||||
name = 'is_online'
|
||||
|
@ -35,4 +25,9 @@
|
|||
countries = $countriesUsed
|
||||
name = 'geo'
|
||||
label = {lang name='user.settings.profile.fields.place.label'} }
|
||||
{/block}
|
||||
{/capture}
|
||||
|
||||
{component 'block'
|
||||
mods = 'users-search'
|
||||
title = {lang 'user.search.title'}
|
||||
content = $smarty.capture.block_content}
|
|
@ -2,16 +2,7 @@
|
|||
* Статистика по пользователям
|
||||
*}
|
||||
|
||||
{extends 'Component@block.block'}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} users-stats"}
|
||||
{/block}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.user.stats.title}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{component 'user' template='stat' stat=$usersStat}
|
||||
{/block}
|
||||
{component 'block'
|
||||
mods = 'info users-stats'
|
||||
title = {lang 'user.stats.title'}
|
||||
content = {component 'user' template='stat' stat=$usersStat}}
|
|
@ -14,11 +14,6 @@
|
|||
color: #555;
|
||||
}
|
||||
|
||||
/* О себе */
|
||||
.profile-info-about {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
/* Блок с информацией */
|
||||
.user-info-group {
|
||||
margin-bottom: 50px;
|
||||
|
|
|
@ -2,28 +2,27 @@
|
|||
* Список пользователей (аватары)
|
||||
*
|
||||
* @param array $users Список пользователей
|
||||
* @param array $showPagination Показывать или нет пагинацию (false)
|
||||
* @param array $pagination Массив с параметрами пагинации
|
||||
* @param array $emptyText
|
||||
*}
|
||||
|
||||
{$users = $smarty.local.users}
|
||||
{$pagination = $smarty.local.pagination}
|
||||
{$emptyText = $smarty.local.emptyText}
|
||||
|
||||
{$emptyText = $emptyText|default:$aLang.common.empty}
|
||||
|
||||
{if $users}
|
||||
<ul class="user-list-avatar">
|
||||
{foreach $users as $oUser}
|
||||
{foreach $users as $user}
|
||||
{* TODO: Костыль для блогов *}
|
||||
{if $oUser->getUser()}{$oUser = $oUser->getUser()}{/if}
|
||||
{if $user->getUser()}{$user = $user->getUser()}{/if}
|
||||
|
||||
<li>{component 'user' template='item' user=$oUser avatarSize=64}</li>
|
||||
<li>{component 'user' template='item' user=$user avatarSize=64}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
{if $sUserListEmpty}
|
||||
{component 'alert' text=$sUserListEmpty mods='empty'}
|
||||
{else}
|
||||
{component 'alert' text=$aLang.common.empty mods='empty'}
|
||||
{/if}
|
||||
{component 'alert' text=$emptyText mods='empty'}
|
||||
{/if}
|
||||
|
||||
{if $showPagination}
|
||||
{component 'pagination' paging=$aPaging}
|
||||
{/if}
|
||||
{component 'pagination' total=+$pagination.iCountPage current=+$pagination.iCurrentPage url="{$pagination.sBaseUrl}/page__page__/"}
|
|
@ -1,45 +1,40 @@
|
|||
{extends 'Component@item.item'}
|
||||
{if $user->getUser()}
|
||||
{$user = $user->getUser()}
|
||||
{/if}
|
||||
|
||||
{block 'options' append}
|
||||
{if $user->getUser()}
|
||||
{$user = $user->getUser()}
|
||||
{* Заголовок *}
|
||||
{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}
|
||||
|
||||
{* Заголовок *}
|
||||
{capture 'user_list_item_title'}
|
||||
<a href="{$user->getUserWebPath()}">{$user->getDisplayName()}</a>
|
||||
{/capture}
|
||||
{* Информация *}
|
||||
{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}
|
||||
|
||||
{$title = $smarty.capture.user_list_item_title}
|
||||
{component 'info-list' classes='object-list-item-info' list=[
|
||||
[ 'label' => "{$aLang.user.date_last_session}:", 'content' => ( $session ) ? $lastSessionDate : '—' ],
|
||||
[ '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}
|
||||
|
||||
{* Описание *}
|
||||
{capture 'user_list_item_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 : '—' ],
|
||||
[ '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}
|
||||
|
||||
{$content = $smarty.capture.user_list_item_content}
|
||||
|
||||
{* Изображение *}
|
||||
{$image = [
|
||||
{component 'item'
|
||||
title=$smarty.capture.title
|
||||
content=$smarty.capture.content
|
||||
image=[
|
||||
'url' => $user->getUserWebPath(),
|
||||
'path' => $user->getProfileAvatarPath( 100 ),
|
||||
'alt' => $user->getLogin()
|
||||
]}
|
||||
{/block}
|
||||
]}
|
|
@ -10,15 +10,19 @@
|
|||
*}
|
||||
|
||||
{if $smarty.local.users}
|
||||
{$pagination = $smarty.local.pagination}
|
||||
|
||||
{* Заголовок *}
|
||||
{if $smarty.local.searchCount}
|
||||
<h3 class="h3">{lang name='user.search.result_title' count=$smarty.local.searchCount plural=true}</h3>
|
||||
{/if}
|
||||
|
||||
{* Список пользователей *}
|
||||
<ul class="object-list user-list js-more-users-container">
|
||||
{capture 'user_list'}
|
||||
{include './user-list-loop.tpl' users=$smarty.local.users}
|
||||
</ul>
|
||||
{/capture}
|
||||
|
||||
{component 'item' template='group' classes='js-more-users-container' items=$smarty.capture.user_list}
|
||||
|
||||
{* Кнопка подгрузки *}
|
||||
{if $smarty.local.useMore}
|
||||
|
@ -29,7 +33,7 @@
|
|||
ajaxParams = [ 'next_page' => 2 ]}
|
||||
{/if}
|
||||
{else}
|
||||
{component 'pagination' paging=$smarty.local.pagination}
|
||||
{component 'pagination' total=+$pagination.iCountPage current=+$pagination.iCurrentPage url="{$pagination.sBaseUrl}/page__page__/"}
|
||||
{/if}
|
||||
{else}
|
||||
{component 'alert' text=$smarty.local.textEmpty|default:{lang name='user.notices.empty'} mods='empty'}
|
||||
|
|
|
@ -1242,6 +1242,7 @@ return array(
|
|||
),
|
||||
// Поиск
|
||||
'search' => array(
|
||||
'title' => 'Поиск по пользователям',
|
||||
'placeholder' => 'Поиск по логину',
|
||||
'result_title' => 'Найден %%count%% пользователь;Найдено %%count%% пользователя;Найдено %%count%% пользователей'
|
||||
),
|
||||
|
|
|
@ -68,7 +68,7 @@ jQuery(document).ready(function($){
|
|||
/**
|
||||
* Tabs
|
||||
*/
|
||||
$( '.js-tabs-auth, .js-tabs-block' ).lsTabs();
|
||||
$( '.js-tabs-auth' ).lsTabs();
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue