{% extends "/layout/profile.html" %} {% from "/macros/rating.html" import rating %} {% from "/macros/profile/profile-questions.html" import confirmationModal, addQuestionModal, editQuestion, commentForm %} {% from "/macros/profile-image.html" import userImageMedium %} {% set localI18n = application.questions.i18n %} {% set questions = application.questions.items %} {% set user = config.user %} {% block data %} {% endblock %} {% block contentSection %}

{% if questions.length %} {{ localI18n.headers.whatWouldYou }} {% else %} {{ localI18n.headers.noQuestion }} {% endif %}

{% if user.isLoggedIn %} {% else %} {% endif %}
{% if questions.length %}

{{ localI18n.headers.nbQuestions }}

    {% for question in questions %}
  • {{ userImageMedium(question.author.profilePicUrl) }}

    {{ question.title }}

    {{ question.comment }}

    {{ question.byDate }}

    {% if question.answerCount %} {{ question.i18n.showAnswer }} {% endif %} {% if user.isLoggedIn %} {{ localI18n.labels.answer }} {% endif %} {% if question.isCurrentUserQuestion %} {{ localI18n.labels.edit }} {% endif %} {% if question.isCurrentUserQuestion and not question.answerCount %} {{ localI18n.labels.delete }} {% endif %}

    {{ editQuestion(localI18n, question.title, question.comment) }} {{ commentForm(localI18n) }}
  • {% endfor %}
{% endif %}
{{ confirmationModal("delete-entry-confirmation", localI18n.labels.confirm, localI18n.messages.confirm.deleteEntry, localI18n) }} {{ confirmationModal("delete-comment-confirmation", localI18n.labels.confirm, localI18n.messages.confirm.deleteComment, localI18n) }} {{ addQuestionModal(localI18n) }} {% endblock %}