src/WebBundle/Resources/views/Comment/comment-tab.html.twig line 1

Open in your IDE?
  1. {#{% if te.locale().getUserLocale() != 'ru' %}#}
  2.     {% set isJobPage = not( te.request.host | strPos(jobsSubdomain ~ '.') is same as(false) ) %}
  3.     {% set search = jobsSubdomain ~ '.' ~ replaceInJobsLink4thLevel %}
  4.     {% set route = isJobPage ? 'app_job_comment_block' : 'app_comment_block' %}
  5.     {% set subscribeFormUrl = isJobPage ? url('app_job_comment_subscribe_form') : url('app_comment_subscribe_form') %}
  6.     {% set commentSubscribeUrl = isJobPage ? url('app_job_comment_subscribe') : url('app_comment_subscribe') %}
  7.     {#% set errorTranslation = 'error' | trans %#}
  8.     {#% set subscribeTranslation = 'subscribe' | trans %#}
  9.     {#% set subscribedSuccessfullyTranslation = 'subscribed_successfully' | trans %#}
  10.     {% if isJobPage or place == 'bottom' %}
  11.         <div class="tabs-titles comments-tabs-titles{{ isJobPage ? ' tabs-visible' : '' }}">
  12.             <div class="t-t-item active" data-target="comments-block">
  13.                 {% if isJobPage %}
  14.                     <span class="top-header-text">{{ 'comment_add_question' | trans }}</span>
  15.                     <span class="top-header-button heading-button js-call-popup-button" data-target-id="subscribe-block">{{ 'subscribe' | trans }}</span>
  16.                 {% else %}
  17.                     {{ 'blog_comments' | trans }}
  18.                 {% endif %}
  19.             </div>
  20.         </div>
  21.         <div class="page-comments single-comments-block tab-block-content clearfix js-comment-block{{ isJobPage ? ' job-site-comments' : '' }}"
  22.              data-action="{{ ( path(route, {'unid': unid, 'entity': entity, 'type': type}) ) | replace({(search): jobsSubdomain}) }}"
  23.              data-comments-category="{{ constant('FlexApp\\Entity\\CommentEntity::BOTTOM') }}"
  24.              data-id="comments-block"{# style="display: block;" {{ te.request.host }}#}
  25.         >
  26.             <div class="smallTimer"></div>
  27.         </div>
  28.         {% if isJobPage %}
  29.             <div class="reviews-and-comments-overlay comments-overlay hidden"
  30.                  data-comments-category="{{ constant('FlexApp\\Entity\\CommentEntity::QA') }}"
  31.                  data-comments-type="{{ type }}"
  32.                   data-subscribe-action="{{ commentSubscribeUrl }}"
  33.                   data-subscribe-form="{{ subscribeFormUrl }}"
  34.             >
  35.                 <input id="commentable-unid" type="hidden" value="{{ unid }}" />
  36.                 <input id="entity-id" type="hidden" value="{{ entity }}" />
  37.                 <div class="reviews-and-comments-popup">
  38.                     <div class="close-buttons-wrapper">
  39.                         <span class="material-icons close-btn">&#xe5cd;</span>
  40.                         <span class="close-btn-mobile">
  41.                             <span class="c-b-m-icon"></span>
  42.                             <span class="c-b-m-text">{{ 'collection_back' | trans }}</span>
  43.                         </span>
  44.                     </div>
  45.                     <div class="smallTimer"></div>
  46.                     <div class="reviews-and-comments-popup-content">
  47.                         <div class="page-comments popup-content-block hidden clearfix" data-id="subscribe-block">
  48.                             <div class="reviews-and-comments-popup-heading">{{ 'subscribe' | trans }}</div>
  49.                             <div class="p-c-b-inner-wrapper"></div>
  50.                         </div>
  51.                     </div>
  52.                 </div>
  53.             </div>
  54.         {% endif %}
  55.     {% else %}
  56.         <div class="reviews-and-comments-overlay comments-overlay hidden" 
  57.              data-comments-category="{{ constant('FlexApp\\Entity\\CommentEntity::QA') }}"
  58.              data-comments-type="{{ type }}"
  59.              data-action="{{ ( path(route, {'unid': unid, 'entity': entity, 'type': type}) ) | replace({(search): jobsSubdomain}) }}"
  60.              data-subscribe-action="{{ commentSubscribeUrl }}"
  61.              data-subscribe-form="{{ subscribeFormUrl }}"
  62.         >
  63.             <input id="commentable-unid" type="hidden" value="{{ unid }}" />
  64.             <input id="entity-id" type="hidden" value="{{ entity }}" />
  65.             <div class="reviews-and-comments-popup">
  66.                 <div class="close-buttons-wrapper">
  67.                     <span class="material-icons close-btn">&#xe5cd;</span>
  68.                     <span class="close-btn-mobile">
  69.                         <span class="c-b-m-icon"></span>
  70.                         <span class="c-b-m-text">{{ 'collection_back' | trans }}</span>
  71.                     </span>
  72.                 </div>
  73.                 <div class="smallTimer"></div>
  74.                 <div class="reviews-and-comments-popup-content">
  75.                     <div class="page-comments popup-content-block hidden clearfix" data-id="comments-block">
  76.                         <div class="reviews-and-comments-popup-heading">{{ 'comment_add_question' | trans }}</div>
  77.                         <div class="p-c-b-inner-wrapper"></div>
  78.                     </div>
  79.                     <div class="page-comments popup-content-block hidden clearfix" data-id="subscribe-block">
  80.                         <div class="reviews-and-comments-popup-heading">{{ 'subscribe' | trans }}</div>
  81.                         <div class="p-c-b-inner-wrapper"></div>
  82.                     </div>
  83.                 </div>
  84.             </div>
  85.         </div>
  86.     {% endif %}
  87. {#{% endif %}#}