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

{$iCountComment} {$iCountComment|declension:$aLang.comments.comments_declension}

{* Подписка на комментарии *} {if $bAllowSubscribe and $oUserCurrent}


{/if} {* Свернуть/развернуть все *} {$aLang.comments.folding.fold_all} | {$aLang.comments.folding.unfold_all}
{** * Комментарии *} {$iCurrentLevel = -1} {$iMaxLevel = $oConfig->GetValue('module.comment.max_tree')} {foreach $aComments as $oComment} {$iCommentLevel = $oComment->getLevel()} {if $iCommentLevel > $iMaxLevel} {$iCommentLevel = $iMaxLevel} {/if} {if $iCurrentLevel > $iCommentLevel} {section name=closelist1 loop=$iCurrentLevel - $iCommentLevel + 1}
{/section} {elseif $iCurrentLevel == $iCommentLevel && ! $oComment@first} {/if}
{include 'comments/comment.tpl'} {$iCurrentLevel = $iCommentLevel} {if $oComment@last} {section name=closelist2 loop=$iCurrentLevel + 1}
{/section} {/if} {/foreach} {** * Пагинация *} {include 'comments/comment_pagination.tpl' aPagingCmt=$aPagingCmt} {hook run='comment_tree_end' iTargetId=$iTargetId sTargetType=$sTargetType} {** * Форма добавления комментария *} {if $bAllowNewComment} {include 'alert.tpl' sAlertStyle='info' mAlerts=$sNoticeNotAllow} {else} {if $oUserCurrent} {* Ссылка открывающая форму *}

{$sNoticeCommentAdd}

{include 'comments/comment.form.tpl'} {else} {include 'alert.tpl' sAlertStyle='info' mAlerts=$aLang.comments.alerts.unregistered} {/if} {/if}