1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 23:00:51 +03:00

Доработка компонентов

This commit is contained in:
Denis Shakhov 2014-10-28 19:08:03 +07:00
parent 9cad98dcab
commit ad6a2894c7
33 changed files with 201 additions and 320 deletions

View file

@ -173,7 +173,7 @@ class ActionAjax extends Action
$oViewer->Assign('sImageSrc', getRequestStr('image_src'));
$this->Viewer_AssignAjax('sText', $oViewer->Fetch("modals/modal.image_crop.tpl"));
$this->Viewer_AssignAjax('sText', $oViewer->Fetch("components/crop/crop.tpl"));
}
protected function EventPollVote()
@ -1658,8 +1658,8 @@ class ActionAjax extends Action
{
if ($aComments = $this->Comment_GetCommentsOnline('topic', Config::Get('block.stream.row'))) {
$oViewer = $this->Viewer_GetLocalViewer();
$oViewer->Assign('aComments', $aComments);
$sTextResult = $oViewer->Fetch("blocks/block.stream_comment.tpl");
$oViewer->Assign('comments', $aComments, true);
$sTextResult = $oViewer->Fetch("components/activity/blocks/recent-comments.tpl");
$this->Viewer_AssignAjax('sText', $sTextResult);
} else {
$this->Message_AddErrorSingle($this->Lang_Get('block_stream_comments_no'), $this->Lang_Get('attention'));
@ -1676,8 +1676,8 @@ class ActionAjax extends Action
{
if ($oTopics = $this->Topic_GetTopicsLast(Config::Get('block.stream.row'))) {
$oViewer = $this->Viewer_GetLocalViewer();
$oViewer->Assign('oTopics', $oTopics);
$sTextResult = $oViewer->Fetch("blocks/block.stream_topic.tpl");
$oViewer->Assign('topics', $oTopics, true);
$sTextResult = $oViewer->Fetch("components/activity/blocks/recent-topics.tpl");
$this->Viewer_AssignAjax('sText', $sTextResult);
} else {
$this->Message_AddErrorSingle($this->Lang_Get('activity.block_recent.topics_empty'),

View file

@ -25,7 +25,7 @@
* @package application.blocks
* @since 1.0
*/
class BlockStream extends Block
class BlockActivityRecent extends Block
{
/**
* Запуск обработки
@ -37,12 +37,14 @@ class BlockStream extends Block
*/
if ($aComments = $this->Comment_GetCommentsOnline('topic', Config::Get('block.stream.row'))) {
$oViewer = $this->Viewer_GetLocalViewer();
$oViewer->Assign('aComments', $aComments);
$oViewer->Assign('comments', $aComments, true);
/**
* Формируем результат в виде шаблона и возвращаем
*/
$sTextResult = $oViewer->Fetch("blocks/block.stream_comment.tpl");
$this->Viewer_Assign('sStreamComments', $sTextResult);
$sTextResult = $oViewer->Fetch("components/activity/blocks/recent-comments.tpl");
$this->Viewer_Assign('content', $sTextResult, true);
}
$this->SetTemplate('components/activity/blocks/block.activity-recent.tpl');
}
}

View file

@ -39,5 +39,7 @@ class BlockActivitySettings extends Block
$this->Viewer_Assign('types', $this->Stream_getEventTypes());
$this->Viewer_Assign('typesActive', $this->Stream_getTypesList($oUserCurrent->getId()));
}
$this->SetTemplate('components/activity/blocks/block.activity-settings.tpl');
}
}

View file

@ -38,5 +38,7 @@ class BlockActivityUsers extends Block
if ($oUserCurrent = $this->User_getUserCurrent()) {
$this->Viewer_Assign('users', $this->Stream_getUserSubscribes($oUserCurrent->getId()));
}
$this->SetTemplate('components/activity/blocks/block.activity-users.tpl');
}
}

View file

@ -53,5 +53,7 @@ class BlockPollFormItems extends Block
$aPollItems = $this->Poll_GetPollItemsByFilter($aFilter);
$this->Viewer_Assign('aPollItems', $aPollItems);
$this->SetTemplate('components/poll/poll.manage.list.tpl');
}
}

View file

@ -396,7 +396,7 @@ $config['block']['rule_index_blog'] = array(
),
'blocks' => array(
'right' => array(
'stream' => array('priority' => 100),
'activityRecent' => array('priority' => 100),
'tags' => array('priority' => 50),
'blogs' => array('params' => array(), 'priority' => 1)
)
@ -589,12 +589,10 @@ $config['head']['default']['js'] = array(
);
$config['head']['default']['css'] = array(
"___path.framework.frontend.web___/css/reset.css",
"___path.framework.frontend.web___/css/helpers.css",
"___path.framework.frontend.web___/css/text.css",
"___path.framework.frontend.web___/css/forms.css",
"___path.framework.frontend.web___/css/typography.css",
"___path.framework.frontend.web___/css/grid.css",
"___path.skin.web___/components/css-reset/css/css-reset.css",
"___path.skin.web___/components/css-helpers/css/css-helpers.css",
"___path.skin.web___/components/forms/css/forms.css",
"___path.skin.web___/components/grid/css/grid.css",
"___path.skin.web___/components/ls-vendor/jquery-ui/css/smoothness/jquery-ui-1.10.2.custom.css",
"___path.skin.web___/components/ls-vendor/jcrop/jquery.Jcrop.css",
"___path.skin.web___/components/ls-vendor/prettify/prettify.css",
@ -603,10 +601,13 @@ $config['head']['default']['css'] = array(
"___path.skin.web___/components/ls-vendor/colorbox/colorbox.css",
"___path.skin.web___/components/ls-vendor/timepicker/jquery-ui-timepicker-addon.css",
"___path.skin.web___/components/ls-vendor/notifier/jquery.notifier.css",
"___path.skin.web___/components/text/css/text.css",
"___path.skin.web___/components/admin/css/admin.css",
"___path.skin.web___/components/tabs/css/tabs.css",
"___path.skin.web___/components/perfomance/css/perfomance.css",
"___path.skin.web___/components/tooltip/css/tooltip.css",
"___path.skin.web___/components/progressbar/css/progressbar.css",
"___path.skin.web___/components/badge/css/badge.css",
"___path.skin.web___/components/alert/css/alert.css",
"___path.skin.web___/components/accordion/css/accordion.css",
"___path.skin.web___/components/dropdown/css/dropdown.css",
@ -641,7 +642,9 @@ $config['head']['default']['css'] = array(
"___path.skin.web___/components/info-list/css/info-list.css",
"___path.skin.web___/components/uploader/css/uploader.css",
"___path.skin.web___/components/activity/css/activity.css",
"___path.skin.web___/components/activity/css/block.activity-recent.css",
"___path.skin.web___/components/block/css/block.css",
"___path.skin.web___/components/item/css/item.css",
"___path.skin.web___/components/tags/css/tags.css",
"___path.skin.web___/components/user/css/user.css",
"___path.skin.web___/components/user/css/user-item.css",
@ -650,7 +653,8 @@ $config['head']['default']['css'] = array(
"___path.skin.web___/components/user-list-add/css/user-list-add.css",
"___path.skin.web___/components/talk/css/talk.css",
"___path.skin.web___/components/userbar/css/userbar.css",
"___path.skin.web___/components/modal-create/css/modal-create.css"
"___path.skin.web___/components/modal-create/css/modal-create.css",
"___path.skin.web___/components/crop/css/crop.css"
);
// Стили для RTL языков

View file

@ -21,9 +21,6 @@ body {
a { color: #1A80DB; text-decoration: none; }
a:hover { color: #058; }
.text a:visited,
.item-list li a:visited { color: #1D2273; }
/**
* Заголовки

View file

@ -1,85 +0,0 @@
/**
* Общие стили
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
/**
* Item List
*/
.item-list { }
.item-list li { min-height: 51px; padding: 17px 15px 20px 80px; border-top: 1px solid #eee; position: relative; zoom: 1; background: #fff; }
.item-list li:first-child { border: none; }
.item-list li p { padding-top: 2px; font-size: 11px; }
.item-list li a { text-decoration: none; }
.item-list li .avatar { position: absolute; top: 20px; left: 20px; margin-right: 10px; }
.item-list li .author { font-weight: bold; color: #333; }
.item-list li .blog-name { font-weight: bold; }
/**
* Список объектов
*/
.object-list { margin-bottom: 20px; border-bottom: 1px solid #eee; }
.object-list-item { border-top: 1px solid #eee; padding: 15px 0 15px 120px; position: relative; min-height: 100px; }
.object-list-item-image { position: absolute; top: 17px; left: 0; }
.object-list-item-title { font-size: 24px; line-height: 1.1em; margin-bottom: 10px; }
.object-list-item-description { margin-bottom: 15px; }
.object-list-item-actions { position: absolute; top: 15px; right: 0; width: 150px; text-align: right; }
.object-list.object-list-actions .object-list-item { padding-right: 170px; }
/**
* Progress Bar
*/
.progress-bar { height: 25px; width: 100%; background: #8BC4E0; color: #fff; overflow: hidden; position: relative; border-radius: 3px; }
.progress-bar-value {
height: 25px;
background: #149bdf;
background: -moz-linear-gradient(top, #149bdf 0%, #0480be 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, #149bdf), color-stop(100%, #0480be));
background: -webkit-linear-gradient(top, #149bdf 0%, #0480be 100%);
background: -o-linear-gradient(top, #149bdf 0%, #0480be 100%);
background: -ms-linear-gradient(top, #149bdf 0%, #0480be 100%);
background: linear-gradient(to bottom, #149bdf 0%, #0480be 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#149bdf', endColorstr='#0480be', GradientType=0 );
}
.progress-bar-label { height: 25px; width: 100%; line-height: 25px; text-align: center; position: absolute; top: 0; left: 0; color: #fff; }
/**
* Badge
*/
.badge {
border-radius: 3px;
background: #2891D3;
color: #fff;
padding: 1px 5px;
font-size: 11px;
font-weight: bold;
vertical-align: top;
margin-left: 3px;
}
/**
* Разное
*/
.user, .ls-user { font-weight: bold; color: #333; }
.ls-user { display: inline-block; }
.ls-user:before {
content: '';
display: inline-block;
width: 14px;
height: 14px;
margin-right: 3px;
background: url(../images/icons.png) -168px 0 no-repeat;
vertical-align: middle;
}
.user.inactive { color: #aaa; cursor: help; }
.hide { display: none; }

View file

@ -1,22 +0,0 @@
/**
* Модальные окна
*
* @template modals/*.tpl
* @scripts <frontend_framework>/js/modal.js
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
/**
* Кроп изображений
*
* @template modals/modal.image_crop.tpl
*/
.modal-image-crop { max-width: 600px; }
.crop-image-holder { margin-right: 10px; }
.crop-image-holder,
.crop-previews { display: inline-block; vertical-align: top; }
.crop-preview { overflow: hidden; margin-bottom: 15px; }

View file

@ -1,25 +0,0 @@
/**
* Таблицы
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*
* TODO: Перенести таблицы
*/
.table { width: 100%; margin-bottom: 15px; }
.table th { text-align: left; background: #fafafa; }
.table td, .table th { border-bottom: 1px solid #eee; padding: 10px; }
.table tr.active td { background: #CBF4BC; }
.table a.asc:after { content: "▲"; }
.table a.desc:after { content: "▼"; }
/**
* Информация о пользователе
*/
.table.table-profile-info { margin-bottom: 40px; }
.table.table-profile-info td { vertical-align: top; }
.table.table-profile-info .cell-label { width: 30%; color: #777; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 B

View file

@ -27,5 +27,5 @@
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="button">RSS</a>
{* Вступить / Покинуть блог *}
{include 'components/blog/join.tpl'}
{include 'components/blog/join.tpl' blog=$oBlog}
{/block}

View file

@ -1 +0,0 @@
{include 'components/poll/poll.manage.list.tpl'}

View file

@ -1,30 +0,0 @@
{**
* Прямой эфир
* Топики отсортированные по времени последнего комментария
*}
<div class="block-content">
<ul class="item-list">
{foreach $aComments as $oComment}
{$oUser = $oComment->getUser()}
{$oTopic = $oComment->getTarget()}
{$oBlog = $oTopic->getBlog()}
<li class="js-title-comment" title="{$oComment->getText()|strip_tags|trim|truncate:100:'...'|escape}">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getDisplayName()}</a> &rarr;
<a href="{$oBlog->getUrlFull()}" class="blog-name">{$oBlog->getTitle()|escape}</a> &rarr;
<a href="{if Config::Get('module.comment.nested_per_page')}{router page='comments'}{else}{$oTopic->getUrl()}#comment{/if}{$oComment->getId()}">{$oTopic->getTitle()|escape}</a>
<p>
<time datetime="{date_format date=$oComment->getDate() format='c'}">
{date_format date=$oComment->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
</time> |
{lang name='comments.comments_declension' count=$oTopic->getCountComment() plural=true}
</p>
</li>
{/foreach}
</ul>
</div>

View file

@ -27,7 +27,7 @@
* Показывается если в меню что выше пунктов больше установленного значения (по умолчанию - 2)
*}
{include 'components/tabs/tabs.tpl' classes='js-tabs-block js-activity-block-recent-tabs' tabs=[
[ 'text' => {lang 'activity.block_recent.comments'}, 'url' => "{router page='ajax'}stream/comment", 'content' => $sStreamComments ],
[ '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}

View file

@ -0,0 +1,32 @@
{**
* Прямой эфир
* Топики отсортированные по времени последнего комментария
*}
<div class="block-content">
<ul class="item-list">
{foreach $smarty.local.comments as $comment}
{$user = $comment->getUser()}
{$topic = $comment->getTarget()}
{$blog = $topic->getBlog()}
<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>
<a href="{$user->getUserWebPath()}" class="author">{$user->getDisplayName()}</a> &rarr;
<a href="{$blog->getUrlFull()}" class="blog-name">{$blog->getTitle()|escape}</a> &rarr;
<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, H:i"}
</time> |
{lang name='comments.comments_declension' count=$topic->getCountComment() plural=true}
</p>
</li>
{/foreach}
</ul>
</div>

View file

@ -7,7 +7,7 @@
<div class="block-content">
<ul class="item-list">
{foreach $oTopics as $oTopic}
{foreach $smarty.local.topics as $oTopic}
{$oUser = $oTopic->getUser()}
{$oBlog = $oTopic->getBlog()}

View file

@ -0,0 +1,17 @@
/**
* Activity Item List
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*
* TODO: Component item
*/
.item-list li { min-height: 51px; padding: 17px 15px 20px 80px; border-top: 1px solid #eee; position: relative; zoom: 1; background: #fff; }
.item-list li:first-child { border: none; }
.item-list li p { padding-top: 2px; font-size: 11px; }
.item-list li a { text-decoration: none; }
.item-list li .avatar { position: absolute; top: 20px; left: 20px; margin-right: 10px; }
.item-list li .author { font-weight: bold; color: #333; }
.item-list li .blog-name { font-weight: bold; }

View file

@ -11,7 +11,6 @@
.block .text { font-size: 13px; line-height: 18px; }
.block .max-height-200 { overflow: auto; max-height: 200px; position: relative; }
.block .block-content.loading { min-height: 100px; background-image: url(../images/loader.gif); background-position: 50% 45px; }
/* Шапка */
.block-header { padding: 18px 20px 0; position: relative; }

View file

@ -0,0 +1,42 @@
{extends 'components/item/item.tpl'}
{block 'options' append}
{* Заголовок *}
{capture 'blog_list_item_title'}
{if $blog->getType() == 'close'}
<i title="{$aLang.blog.private}" class="icon-lock"></i>
{/if}
<a href="{$blog->getUrlFull()}">{$blog->getTitle()|escape}</a>
{/capture}
{$title = $smarty.capture.blog_list_item_title}
{* Описание *}
{capture 'blog_list_item_content'}
<p class="object-list-item-description">{$blog->getDescription()|strip_tags|truncate:120}</p>
{* Информация *}
{$info = [
[ 'label' => "{$aLang.blog.users.readers_total}:", 'content' => $blog->getCountUser() ],
[ 'label' => "{$aLang.vote.rating}:", 'content' => $blog->getRating() ],
[ 'label' => "{$aLang.blog.topics_total}:", 'content' => $blog->getCountTopic() ]
]}
{include 'components/info-list/info-list.tpl' aInfoList=$info sInfoListClasses='object-list-item-info'}{* Действия *}
<div class="object-list-item-actions">
{* Вступить/покинуть блог *}
{include './join.tpl' blog=$blog}
</div>
{/capture}
{$content = $smarty.capture.blog_list_item_content}
{* Изображение *}
{$image = [
'url' => $blog->getUrlFull(),
'path' => $blog->getAvatarPath( 100 ),
'alt' => $blog->getTitle()|escape
]}
{/block}

View file

@ -8,61 +8,28 @@
{* Список блогов *}
{if $aBlogs}
{if $iSearchCount}
<h3 class="h3">{lang name='blog.search.result_title' count=$iSearchCount plural=true}</h3>
{/if}
{if $iSearchCount}
<h3 class="h3">{lang name='blog.search.result_title' count=$iSearchCount plural=true}</h3>
{/if}
{* Список блогов *}
<ul class="object-list object-list-actions blog-list js-more-blogs-container">
{foreach $aBlogs as $oBlog}
<li class="object-list-item">
{* Аватар *}
<a href="{$oBlog->getUrlFull()}">
<img src="{$oBlog->getAvatarPath(100)}" width="100" height="100" alt="{$oBlog->getTitle()|escape}" class="object-list-item-image" />
</a>
{* Заголовок *}
<h2 class="object-list-item-title">
{if $oBlog->getType() == 'close'}
<i title="{$aLang.blog.private}" class="icon-lock"></i>
{/if}
<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape}</a>
</h2>
{* Описание *}
<p class="object-list-item-description">{$oBlog->getDescription()|strip_tags|truncate:120}</p>
{* Информация *}
{$info = [
[ 'label' => "{$aLang.blog.users.readers_total}:", 'content' => $oBlog->getCountUser() ],
[ 'label' => "{$aLang.vote.rating}:", 'content' => $oBlog->getRating() ],
[ 'label' => "{$aLang.blog.topics_total}:", 'content' => $oBlog->getCountTopic() ]
]}
{include 'components/info-list/info-list.tpl' aInfoList=$info sInfoListClasses='object-list-item-info'}
{* Действия *}
<div class="object-list-item-actions">
{* Вступить/покинуть блог *}
{include './join.tpl'}
</div>
</li>
{/foreach}
</ul>
{if $bUseMore}
{if ! $bHideMore}
{include 'components/more/more.tpl'
classes = 'js-more-search'
target = '.js-more-blogs-container'
attributes = 'data-search-type="blogs" data-proxy-page-next="2"'}
{/if}
{else}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{/if}
{* Список блогов *}
<ul class="object-list object-list-actions blog-list js-more-blogs-container">
{foreach $aBlogs as $blog}
{include './blog-list-item.tpl' blog=$blog}
{/foreach}
</ul>
{* Кнопка подгрузки *}
{if $bUseMore}
{if ! $bHideMore}
{include 'components/more/more.tpl'
classes = 'js-more-search'
target = '.js-more-blogs-container'
attributes = 'data-search-type="blogs" data-proxy-page-next="2"'}
{/if}
{else}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{/if}
{else}
{include 'components/alert/alert.tpl' text=(($sBlogsEmptyList) ? $sBlogsEmptyList : $aLang.blog.alerts.empty) mods='empty'}
{include 'components/alert/alert.tpl' text=(($sBlogsEmptyList) ? $sBlogsEmptyList : $aLang.blog.alerts.empty) mods='empty'}
{/if}

View file

@ -1,16 +1,16 @@
{**
* Кнопка Вступить / Покинуть блог
*
* @param object $oBlog Блог
* @param object $blog Блог
* @param object $oUserCurrent Текущий пользователь
*
* @scripts <framework>/js/livestreet/blog.js
*}
{if $oUserCurrent && $oUserCurrent->getId() != $oBlog->getOwnerId() && $oBlog->getType() == 'open'}
{if $oUserCurrent && $oUserCurrent->getId() != $blog->getOwnerId() && $blog->getType() == 'open'}
{include 'components/button/button.tpl'
attributes = "data-blog-id=\"{$oBlog->getId()}\""
attributes = "data-blog-id=\"{$blog->getId()}\""
classes = 'js-blog-join'
text = ($oBlog->getUserIsJoin()) ? $aLang.blog.join.leave : $aLang.blog.join.join
mods = ($oBlog->getUserIsJoin()) ? false : 'primary'}
text = ($blog->getUserIsJoin()) ? $aLang.blog.join.leave : $aLang.blog.join.join
mods = ($blog->getUserIsJoin()) ? false : 'primary'}
{/if}

View file

@ -37,11 +37,11 @@
{* Текст комментария *}
{include 'components/editor/editor.tpl'
sSet = $smarty.local.sEditorSet|default:'light'
set = $smarty.local.sEditorSet|default:'light'
name = 'comment_text'
inputClasses = 'js-comment-form-text'
bShowHelp = false
sMediaTargetType = 'comment'}
inputClasses = 'js-editor-default js-comment-form-text'
help = false
mediaTargetType = 'comment'}
{/block}
{hook run='comment-form-end'}

View file

@ -10,7 +10,7 @@
{$component = 'user-note'}
{* Установка дефолтных значений *}
{$note = $smarty.local.target}
{$note = $smarty.local.note}
{$isEditable = $smarty.local.isEditable|default:true}
<div class="{$component} {mod name=$component mods=$mods} {$smarty.local.classes}" data-param-i-user-id="{$smarty.local.targetId}" {$smarty.local.attributes}>

View file

@ -0,0 +1,45 @@
{extends 'components/item/item.tpl'}
{block 'options' append}
{if $user->getUser()}
{$user = $user->getUser()}
{/if}
{* Заголовок *}
{capture 'user_list_item_title'}
<a href="{$user->getUserWebPath()}">{$user->getDisplayName()}</a>
{/capture}
{$title = $smarty.capture.user_list_item_title}
{* Описание *}
{capture 'user_list_item_content'}
{$session = $user->getSession()}
{$usernote = $user->getUserNote()}
{* Заметка *}
{if $usernote}
{include 'components/note/note.tpl' 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}
{include 'components/info-list/info-list.tpl' sInfoListClasses='object-list-item-info' aInfoList=[
[ '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}
{$content = $smarty.capture.user_list_item_content}
{* Изображение *}
{$image = [
'url' => $user->getUserWebPath(),
'path' => $user->getProfileAvatarPath( 100 ),
'alt' => $user->getLogin()
]}
{/block}

View file

@ -5,39 +5,5 @@
*}
{foreach $smarty.local.users as $user}
{* TODO: Убрать костыль для блогов *}
{if $user->getUser()}
{$user = $user->getUser()}
{/if}
{$session = $user->getSession()}
{$usernote = $user->getUserNote()}
<li class="object-list-item">
{* Аватар *}
<a href="{$user->getUserWebPath()}">
<img src="{$user->getProfileAvatarPath(100)}" width="100" height="100" alt="{$user->getLogin()}" class="object-list-item-image" />
</a>
{* Заголовок *}
<h2 class="object-list-item-title">
<a href="{$user->getUserWebPath()}">{$user->getDisplayName()}</a>
</h2>
{* Заметка *}
{if $usernote}
{include 'components/note/note.tpl' 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}
{include 'components/info-list/info-list.tpl' sInfoListClasses='object-list-item-info' aInfoList=[
[ '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() ]
]}
</li>
{include './user-list-item.tpl' user=$user}
{/foreach}

View file

@ -22,7 +22,6 @@
{else}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{/if}
{else}
{include 'components/alert/alert.tpl' text=$sUserListEmpty|default:{lang name='user.notices.empty'} mods='empty'}
{/if}

View file

@ -1,29 +0,0 @@
{**
* Ресайз загруженного изображения
*}
{extends 'components/modal/modal.tpl'}
{block 'modal_id'}modal-image-crop{/block}
{block 'modal_class'}modal-image-crop js-modal-default{/block}
{block 'modal_title'}{lang 'modal_image_crop.title'}{/block}
{block 'modal_content'}
<div class="crop">
<div class="crop-image-holder js-crop-image-holder">
<img src="{$sImageSrc|escape}" style="width: 370px;" class="crop-image js-crop-image">
</div>
<div class="crop-previews js-crop-previews">
{foreach [ 100, 64, 48 ] as $size}
<div style="width: {$size}px; height: {$size}px;" class="crop-preview js-crop-preview">
<img src="{$sImageSrc|escape}" class="js-crop-preview-image" data-size="{$size}">
</div>
{/foreach}
</div>
</div>
{/block}
{block 'modal_footer_begin'}
{include 'components/button/button.tpl' text=$aLang.common.save classes='js-ajax-image-crop-submit' mods='primary'}
{/block}

View file

@ -25,11 +25,8 @@ $config['head']['default']['js'] = array_merge(Config::Get('head.default.js'), a
// Подключение стилей шаблона
$config['head']['default']['css'] = array_merge(Config::Get('head.default.css'), array(
"___path.skin.assets.web___/css/base.css",
"___path.skin.assets.web___/css/grid.css",
"___path.skin.assets.web___/css/common.css",
"___path.skin.assets.web___/css/tables.css",
"___path.skin.assets.web___/css/layout.css",
"___path.skin.assets.web___/css/blocks.css",
"___path.skin.assets.web___/css/modals.css",
"___path.skin.assets.web___/css/print.css"
));