2014-07-01 19:17:01 +03:00
|
|
|
|
{**
|
|
|
|
|
* Блог
|
|
|
|
|
*
|
|
|
|
|
* @param object $blog Блог
|
2016-01-19 04:34:44 +02:00
|
|
|
|
* @param object $blogs Список блогов для переноса топиков (для модальника удаления)
|
2014-07-01 19:17:01 +03:00
|
|
|
|
* @param string $mods Модификаторы
|
|
|
|
|
* @param string $attributes Дополнительные атрибуты основного блока
|
|
|
|
|
* @param string $classes Дополнительные классы
|
|
|
|
|
*}
|
|
|
|
|
|
|
|
|
|
{* Название компонента *}
|
|
|
|
|
{$component = 'blog'}
|
2016-01-19 04:34:44 +02:00
|
|
|
|
{component_define_params params=[ 'blog', 'blogs', 'mods', 'classes', 'attributes' ]}
|
2014-07-01 19:17:01 +03:00
|
|
|
|
|
|
|
|
|
{* Подключаем модальное окно удаления блога если пользователь админ *}
|
2014-11-05 17:45:27 +02:00
|
|
|
|
{if $oUserCurrent && $oUserCurrent->isAdministrator()}
|
2015-06-17 11:46:55 +03:00
|
|
|
|
{component 'blog' template='modal.delete' blog=$blog blogs=$blogs}
|
2014-07-01 19:17:01 +03:00
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{* Является ли пользователь администратором или управляющим блога *}
|
|
|
|
|
{$isBlogAdmin = $oUserCurrent && ($oUserCurrent->getId() == $blog->getOwnerId() || $oUserCurrent->isAdministrator() || $blog->getUserIsAdministrator())}
|
|
|
|
|
|
|
|
|
|
{* Блог *}
|
2016-01-19 04:34:44 +02:00
|
|
|
|
<div class="{$component} {cmods name=$component mods=$mods} {$classes}" {cattr list=$attributes} data-id="{$blog->getId()}">
|
2014-11-05 17:45:27 +02:00
|
|
|
|
<header class="{$component}-header">
|
|
|
|
|
{* Заголовок *}
|
|
|
|
|
<h2 class="page-header blog-title">
|
|
|
|
|
{if $blog->getType() == 'close'}
|
2015-05-14 17:04:44 +03:00
|
|
|
|
{component 'icon' icon='lock' attributes=[ title => {lang 'blog.private'} ]}
|
2014-11-05 17:45:27 +02:00
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{$blog->getTitle()|escape}
|
|
|
|
|
</h2>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
{* Информация о блоге *}
|
|
|
|
|
<div class="{$component}-content">
|
|
|
|
|
{* Описание *}
|
2015-04-30 17:52:00 +03:00
|
|
|
|
<div class="{$component}-description ls-text">
|
2014-11-05 17:45:27 +02:00
|
|
|
|
{$blog->getDescription()}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{* Информация *}
|
|
|
|
|
{$info = [
|
|
|
|
|
[ 'label' => $aLang.blog.date_created, 'content' => "{date_format date=$blog->getDateAdd() hours_back='12' minutes_back='60' now='60' day='day H:i' format='j F Y'}" ],
|
|
|
|
|
[ 'label' => $aLang.blog.topics_total, 'content' => $blog->getCountTopic() ],
|
|
|
|
|
[ 'label' => $aLang.blog.rating_limit, 'content' => $blog->getLimitRatingTopic() ]
|
|
|
|
|
]}
|
2014-11-04 18:38:31 +02:00
|
|
|
|
|
|
|
|
|
{if $blog->category->getCategory()}
|
|
|
|
|
{$info[] = [ 'label' => "{$aLang.blog.categories.category}:", 'content' => $blog->category->getCategory()->getTitle() ]}
|
|
|
|
|
{/if}
|
|
|
|
|
|
2015-01-03 10:19:49 +02:00
|
|
|
|
{component 'info-list' list=$info}
|
2014-11-05 17:45:27 +02:00
|
|
|
|
</div>
|
2014-07-01 19:17:01 +03:00
|
|
|
|
</div>
|