{** * Комментарии * * @styles css/comments.css *} {* Добавляем в тулбар кнопку обновления комментариев *} {add_block group='toolbar' name='toolbar_comment.tpl' aPagingCmt=$aPagingCmt iTargetId=$iTargetId sTargetType=$sTargetType iMaxIdComment=$iMaxIdComment } {hook run='comment_tree_begin' iTargetId=$iTargetId sTargetType=$sTargetType}

{$iCountComment} {$iCountComment|declension:$aLang.comment_declension:'russian'}

{* Подписка на комментарии *} {if $bAllowSubscribe and $oUserCurrent} {/if}
{** * Комментарии *} {$nesting = -1} {foreach from=$aComments item=oComment name=rublist} {$cmtlevel = $oComment->getLevel()} {if $cmtlevel > $oConfig->GetValue('module.comment.max_tree')} {$cmtlevel = $oConfig->GetValue('module.comment.max_tree')} {/if} {if $nesting < $cmtlevel} {elseif $nesting > $cmtlevel} {section name=closelist1 loop=$nesting - $cmtlevel + 1}
{/section} {elseif not $smarty.foreach.rublist.first} {/if}
{include file='comment.tpl'} {$nesting = $cmtlevel} {if $smarty.foreach.rublist.last} {section name=closelist2 loop=$nesting + 1}
{/section} {/if} {/foreach} {** * Страницы *} {include file='comment_paging.tpl' aPagingCmt=$aPagingCmt} {hook run='comment_tree_end' iTargetId=$iTargetId sTargetType=$sTargetType} {** * Форма добавления комментария *} {if $bAllowNewComment} {$sNoticeNotAllow} {else} {if $oUserCurrent} {* Подключение редактора *} {include file='editor_init.tpl' sEditorType='comment'} {* Ссылка открывающая форму *}

{$sNoticeCommentAdd}

{* Форма *}
{hook run='form_add_comment_begin'} {hook run='form_add_comment_end'}
{else} {$aLang.comment_unregistered} {/if} {/if}