{% extends 'layouts/app.twig' %} {% import 'macros/base.twig' as m %} {% import 'macros/form.twig' as f %} {% block title %} {{ __('faq.faq') }} {% endblock %} {% block content %}

{{ block('title') }} {%- if has_permission_to('faq.edit') -%} {{ m.button(m.icon('plus-lg'), url('admin/faq'), 'secondary') }} {%- endif %}

{% include 'layouts/parts/messages.twig' %}
{% block questions_text %} {% if has_permission_to('question.add') %}

{{ __('faq.questions_link', [url('/questions')]) | raw }}

{% endif %} {% endblock %} {% block text %} {% if text|default(null) %}
{{ text|markdown }}
{% endif %} {% endblock %} {% block row %} {% for item in items %}

{{ item.question }} {{ m.icon('link') }}

{{ item.text|markdown }}
{% endfor %} {% endblock %} {% block ask_question %} {% if has_permission_to('question.add') %}
{{ csrf() }}

{{ __('question.add') }}

{{ f.textarea('text', __('question.question'), {'required': true, 'rows': 5}) }} {{ f.submit() }}
{% endif %} {% endblock %}
{% endblock %}