{% 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 can('faq.edit') -%} {{ m.button(m.icon('plus-lg'), url('/admin/faq')) }} {%- endif %}

{% include 'layouts/parts/messages.twig' %}
{% block questions_text %} {% if can('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 can('question.add') %}
{{ csrf() }}

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

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