2014-02-06 11:33:41 +02:00
|
|
|
|
{**
|
|
|
|
|
* Базовый шаблон топика
|
|
|
|
|
*
|
|
|
|
|
* @styles assets/css/topic.css
|
|
|
|
|
* @scripts <framework>/js/livestreet/topic.js
|
|
|
|
|
*}
|
|
|
|
|
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{* Название компонента *}
|
|
|
|
|
{$component = 'article'}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{block 'article_options'}
|
2014-07-30 13:21:12 +03:00
|
|
|
|
{$isPreview = $smarty.local.isPreview}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{$user = $article->getUser()}
|
|
|
|
|
{$type = ($article->getType()) ? $article->getType() : $smarty.local.type}
|
|
|
|
|
{$isList = $smarty.local.isList}
|
|
|
|
|
{$mods = $smarty.local.mods}
|
|
|
|
|
{$classes = $smarty.local.classes}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{if ! $isList}
|
|
|
|
|
{$mods = "{$mods} single"}
|
|
|
|
|
{/if}
|
|
|
|
|
{/block}
|
|
|
|
|
|
|
|
|
|
{block 'article'}
|
|
|
|
|
<article class="{$component} {mod name=$component mods=$mods} {$classes}" {$smarty.local.attributes}>
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{**
|
|
|
|
|
* Хидер
|
|
|
|
|
*}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{block 'article_header'}
|
|
|
|
|
<header class="{$component}-header">
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{* Заголовок *}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
<h1 class="{$component}-title word-wrap">
|
|
|
|
|
{block 'article_title'}
|
|
|
|
|
{if $isList}
|
|
|
|
|
<a href="{$article->getUrl()}">{$article->getTitle()|escape}</a>
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{else}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{$article->getTitle()|escape}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{/if}
|
|
|
|
|
{/block}
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
{* Информация *}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
<ul class="{$component}-info">
|
|
|
|
|
{block 'article_header_info'}
|
|
|
|
|
<li class="{$component}-info-item {$component}-info-item--date">
|
|
|
|
|
<time datetime="{date_format date=$article->getDateAdd() format='c'}" title="{date_format date=$article->getDateAdd() format='j F Y, H:i'}">
|
|
|
|
|
{date_format date=$article->getDateAdd() format="j F Y, H:i"}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</time>
|
|
|
|
|
</li>
|
|
|
|
|
{/block}
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
{* Управление *}
|
2014-07-30 13:21:12 +03:00
|
|
|
|
{if $article->getIsAllowAction() && ! $isPreview}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{block 'article_header_actions'}
|
|
|
|
|
{$items = [
|
|
|
|
|
[ 'icon' => 'icon-edit', 'url' => $article->getUrlEdit(), 'text' => $aLang.common.edit, 'show' => $article->getIsAllowEdit() ],
|
|
|
|
|
[ 'icon' => 'icon-trash', 'url' => "{$article->getUrlDelete()}?security_ls_key={$LIVESTREET_SECURITY_KEY}", 'text' => $aLang.common.remove, 'show' => $article->getIsAllowDelete() ]
|
|
|
|
|
]}
|
|
|
|
|
{/block}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
|
2014-10-09 19:17:36 +03:00
|
|
|
|
{include 'components/actionbar/actionbar.tpl' items=$items}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{/if}
|
|
|
|
|
</header>
|
|
|
|
|
{/block}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{**
|
|
|
|
|
* Текст
|
|
|
|
|
*}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{block 'article_body'}
|
|
|
|
|
<div class="{$component}-content text">
|
|
|
|
|
{block 'article_content_text'}
|
|
|
|
|
{if $isList}
|
|
|
|
|
{$article->getTextShort()}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
|
|
|
|
|
{* Кат *}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{if $article->getTextShort() != $article->getText()}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
<br/>
|
2014-07-28 19:57:08 +03:00
|
|
|
|
<a href="{$article->getUrl()}#cut" title="{$aLang.topic.read_more}">
|
|
|
|
|
{$article->getCutText()|default:$aLang.topic.read_more}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</a>
|
|
|
|
|
{/if}
|
|
|
|
|
{else}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{$article->getText()}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{/if}
|
|
|
|
|
{/block}
|
|
|
|
|
</div>
|
|
|
|
|
{/block}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{**
|
|
|
|
|
* Футер
|
|
|
|
|
*}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{block 'article_footer'}
|
|
|
|
|
<footer class="{$component}-footer">
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{* Информация *}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{block 'article_footer_info'}
|
|
|
|
|
<ul class="{$component}-info clearfix">
|
|
|
|
|
{block 'article_footer_info_items'}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{* Автор топика *}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
<li class="{$component}-info-item {$component}-info-item--author">
|
2014-10-11 19:19:38 +03:00
|
|
|
|
{include 'components/user/user-item.tpl' oUser=$user iUserItemAvatarSize=48 sUserItemStyle='rounded'}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
{* Ссылка на комментарии *}
|
2014-05-10 19:29:18 +03:00
|
|
|
|
{* Не показываем если комментирование запрещено и кол-во комментариев равно нулю *}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{if $isList && ( ! $article->getForbidComment() || ( $article->getForbidComment() && $article->getCountComment() ) )}
|
|
|
|
|
<li class="{$component}-info-item {$component}-info-item--comments">
|
|
|
|
|
<a href="{$article->getUrl()}#comments">
|
|
|
|
|
{lang name='comments.comments_declension' count=$article->getCountComment() plural=true}
|
2014-06-11 11:58:32 +03:00
|
|
|
|
</a>
|
|
|
|
|
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{if $article->getCountCommentNew()}<span>+{$article->getCountCommentNew()}</span>{/if}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</li>
|
|
|
|
|
{/if}
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{/block} {* /article_footer_info_items *}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</ul>
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{/block} {* /article_footer_info *}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</footer>
|
2014-07-28 19:57:08 +03:00
|
|
|
|
{/block} {* /article_footer *}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
</article>
|
|
|
|
|
{/block}
|