{#{% if te.locale().getUserLocale() != 'ru' %}#}
{% set isJobPage = not( te.request.host | strPos(jobsSubdomain ~ '.') is same as(false) ) %}
{% set search = jobsSubdomain ~ '.' ~ replaceInJobsLink4thLevel %}
{% set route = isJobPage ? 'app_job_comment_block' : 'app_comment_block' %}
{% set subscribeFormUrl = isJobPage ? url('app_job_comment_subscribe_form') : url('app_comment_subscribe_form') %}
{% set commentSubscribeUrl = isJobPage ? url('app_job_comment_subscribe') : url('app_comment_subscribe') %}
{#% set errorTranslation = 'error' | trans %#}
{#% set subscribeTranslation = 'subscribe' | trans %#}
{#% set subscribedSuccessfullyTranslation = 'subscribed_successfully' | trans %#}
{% if isJobPage or place == 'bottom' %}
<div class="tabs-titles comments-tabs-titles{{ isJobPage ? ' tabs-visible' : '' }}">
<div class="t-t-item active" data-target="comments-block">
{% if isJobPage %}
<span class="top-header-text">{{ 'comment_add_question' | trans }}</span>
<span class="top-header-button heading-button js-call-popup-button" data-target-id="subscribe-block">{{ 'subscribe' | trans }}</span>
{% else %}
{{ 'blog_comments' | trans }}
{% endif %}
</div>
</div>
<div class="page-comments single-comments-block tab-block-content clearfix js-comment-block{{ isJobPage ? ' job-site-comments' : '' }}"
data-action="{{ ( path(route, {'unid': unid, 'entity': entity, 'type': type}) ) | replace({(search): jobsSubdomain}) }}"
data-comments-category="{{ constant('FlexApp\\Entity\\CommentEntity::BOTTOM') }}"
data-id="comments-block"{# style="display: block;" {{ te.request.host }}#}
>
<div class="smallTimer"></div>
</div>
{% if isJobPage %}
<div class="reviews-and-comments-overlay comments-overlay hidden"
data-comments-category="{{ constant('FlexApp\\Entity\\CommentEntity::QA') }}"
data-comments-type="{{ type }}"
data-subscribe-action="{{ commentSubscribeUrl }}"
data-subscribe-form="{{ subscribeFormUrl }}"
>
<input id="commentable-unid" type="hidden" value="{{ unid }}" />
<input id="entity-id" type="hidden" value="{{ entity }}" />
<div class="reviews-and-comments-popup">
<div class="close-buttons-wrapper">
<span class="material-icons close-btn"></span>
<span class="close-btn-mobile">
<span class="c-b-m-icon"></span>
<span class="c-b-m-text">{{ 'collection_back' | trans }}</span>
</span>
</div>
<div class="smallTimer"></div>
<div class="reviews-and-comments-popup-content">
<div class="page-comments popup-content-block hidden clearfix" data-id="subscribe-block">
<div class="reviews-and-comments-popup-heading">{{ 'subscribe' | trans }}</div>
<div class="p-c-b-inner-wrapper"></div>
</div>
</div>
</div>
</div>
{% endif %}
{% else %}
<div class="reviews-and-comments-overlay comments-overlay hidden"
data-comments-category="{{ constant('FlexApp\\Entity\\CommentEntity::QA') }}"
data-comments-type="{{ type }}"
data-action="{{ ( path(route, {'unid': unid, 'entity': entity, 'type': type}) ) | replace({(search): jobsSubdomain}) }}"
data-subscribe-action="{{ commentSubscribeUrl }}"
data-subscribe-form="{{ subscribeFormUrl }}"
>
<input id="commentable-unid" type="hidden" value="{{ unid }}" />
<input id="entity-id" type="hidden" value="{{ entity }}" />
<div class="reviews-and-comments-popup">
<div class="close-buttons-wrapper">
<span class="material-icons close-btn"></span>
<span class="close-btn-mobile">
<span class="c-b-m-icon"></span>
<span class="c-b-m-text">{{ 'collection_back' | trans }}</span>
</span>
</div>
<div class="smallTimer"></div>
<div class="reviews-and-comments-popup-content">
<div class="page-comments popup-content-block hidden clearfix" data-id="comments-block">
<div class="reviews-and-comments-popup-heading">{{ 'comment_add_question' | trans }}</div>
<div class="p-c-b-inner-wrapper"></div>
</div>
<div class="page-comments popup-content-block hidden clearfix" data-id="subscribe-block">
<div class="reviews-and-comments-popup-heading">{{ 'subscribe' | trans }}</div>
<div class="p-c-b-inner-wrapper"></div>
</div>
</div>
</div>
</div>
{% endif %}
{#{% endif %}#}