{$currentAdmin = getAdminUser()} {$allowAnonymous = false} {ifmodule COMMENTS__COMMENTS_ANONYMOUS} {$allowAnonymous = true} {/ifmodule} {$allowReplies = ($ctrl.user || ($currentAdmin.id > 0) || $allowAnonymous)} {function renderComments} {foreach $comments as $comment} {$user = $comment->getUser()} {$admin = $comment->getAdmin()} {if $user} {$name = join(' ', [$user.name, $user.surname])} {else} {$name = $admin.name|default:$admin.login} {/if}
{$name|default:"{t}Anonymní{/t}"}
{if $allowReplies}

{t}reagovat{/t}

{/if}

{t}Nahlásit{/t}

{$comment.date|format_date_locale_pretty:'d. L. Y'}
{if $comment.parent}

{t}Reakce na{/t}: {$comment.parent.content nofilter}

{/if}

{$comment.content nofilter}

{* Sem se nacte formulat po kliknuti na tlacitko "Odpovedet" *}
{* Pokud ma komentar odpovedi, tak je vyrenderovat *} {if $comment.children}
{$comment->getChildrenCount()} {t plural="odpovědi" plural5="odpovědí" count=$comment->getChildrenCount()}odpověď{/t} {t}skrýt odpovědi{/t}
{renderComments comments=$comment.children level=($level + 1)}
{/if} {/foreach} {/function}
{block "comments-header"}
{$comments.totalCount} {t plural="příspěvky" plural5="příspěvků" count=$comments.totalCount}příspěvek{/t}

{t}Zeptejte se{/t}

{t}Máte dotaz k tomuto produktu? Využijte této diskuze.{/t}

{if !$ctrl.user && !$allowAnonymous}

{t escape=false url={url s=login}}Pro využití diskuze se .{/t}

{/if}
{if $ctrl.user || $allowAnonymous}
{/if}
{/block} {* sem se nacte formular po kliknu na tlacitko "Pridat komentar" *}
{renderComments comments=$data.comments level=0}
{if $data.pager.number < $data.pager.count} {/if}