{% extends 'base.html.twig' %} {% trans_default_domain "community" %} {% block title %} {{ question.question }} {% endblock %} {% block schemaBlock %} {% endblock %} {% block og_title %} {{question.question}} {% endblock %} {# {% block og_description %}{{(question.content)}}{% endblock %} #} {% block og_url %}{{path('show_community_question' , {'alias':community.alias,'slug':question.slug} ) }}{% endblock %} {% block og_image %} {{ asset(community.assetDir ~ '/' ~ community.coverImage) }} {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% if question.createdBy.image == "default_profile_pic_m.png" or question.createdBy.image == "default_profile_pic_f.png" %} {% set getWebPath = "/bundles/user/img/" %} {% else %} {% set getWebPath = "/uploads/profile/img" %} {% endif %} {% block body %}
{{ include('community/header.html.twig') }}

{{ question.question|raw }}

{{ question.views }}  - {{ question.createdBy.firstName }} {% if app.request.locale == 'ar' %} {% if question.createdBy.gender =='m' %}{{ 'طرح' }}{% else %}{{ 'طرحت' }}{% endif %} {{ question.createdBy.firstName ~ ' ' ~ question.createdBy.lastName }} {% else %} {{ question.createdBy.firstName ~ ' ' ~ question.createdBy.lastName }} {{ 'asked' }} {% endif %}   {% if app.user is not null and (community.createdBy == app.user or question.createdBy == app.user or is_granted("ROLE_G1") ) %} {% if question.createdBy == app.user or is_granted("ROLE_G1") %} {% endif %} {% endif %}
{% for keyword in question.keywords %} {{keyword.context}} {% endfor %}

{{ (question.content)|raw }}
{% if app.user is not null or question.communityQuestionDiscussions|length > 0 %}

{{ 'community.question.comments'|trans }}

{% endif %} {% if app.user is not null %}
{% endif %} {% if communityQuestionDiscussions|length > 0 %}
{% for communityQuestiondiscussion in communityQuestionDiscussions %}
{% include 'community/discussion.html.twig' with {'discussion':communityQuestiondiscussion, 'alias':community.alias, 'slug':question.slug} %}
{% endfor %}
{% include 'community/paginator.html.twig' with { 'routePageUp': path(route,app.request.query.all|merge({'page' : page + 1, 'alias':community.alias, 'slug':question.slug})) , 'routePageZero': path(route,app.request.query.all|merge({'page' : 0, 'alias':community.alias, 'slug':question.slug})) , 'routePageDown': path(route,app.request.query.all|merge({'page' : page - 1, 'alias':community.alias, 'slug':question.slug})), 'routePageLast': path(route,app.request.query.all|merge({'page' : (( communityQuestionDiscussionsCount / numberOfDiscussionResults) |round(0,'ceil')) - 1 , 'alias':community.alias, 'slug':question.slug})), 'lastPage': (( communityQuestionDiscussionsCount / numberOfDiscussionResults) |round(0,'ceil')) - 1, 'page': page, 'numberOfResults' : numberOfDiscussionResults, 'results': communityQuestionDiscussions } %}
{% endif %}
{% if not userman.has_subscribtion() %} {% endif %} {% endblock %}