differentiate Answer questions page

This commit is contained in:
Xu 2024-02-18 17:50:08 +01:00 committed by Igor Scheller
parent e18cddae86
commit ef3f58e999
3 changed files with 21 additions and 3 deletions

View File

@ -1854,6 +1854,9 @@ msgstr "FAQ \"%s\" löschen"
msgid "question.questions"
msgstr "Fragen"
msgid "question.admin"
msgstr "Fragen beantworten"
msgid "question.faq_link"
msgstr "Hast du eine generelle Frage? Vielleicht ist diese schon in den <a href=\"%s\">FAQ</a> beantwortet."

View File

@ -555,6 +555,9 @@ msgstr "Delete FAQ \"%s\""
msgid "question.questions"
msgstr "Questions"
msgid "question.admin"
msgstr "Answer questions"
msgid "question.faq_link"
msgstr "For general questions, have a look at our <a href=\"%s\">FAQ</a>."

View File

@ -2,14 +2,24 @@
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
{% block title %}{{ __('question.questions') }}{% endblock %}
{% block title %}
{% if is_admin | default(false) %}
{{ __('question.admin') }}
{% else %}
{{ __('question.questions') }}
{% endif %}
{% endblock %}
{% block content %}
<div class="container">
<div class="page-header">
<h1>
{{ block('title') }}
{{ m.button(m.icon('plus-lg'), url('/questions/new'), 'secondary') }}
{% if is_admin | default(false) %}
{{ m.button(m.icon('question-lg'), url('/faq'), 'secondary', null, __('faq.faq')) }}
{% else %}
{{ m.button(m.icon('plus-lg'), url('/questions/new'), 'secondary') }}
{% endif %}
</h1>
</div>
@ -21,7 +31,9 @@
{% block questions %}
{% block faq_text %}
{% if has_permission_to('faq.view') %}
<p>{{ __('question.faq_link', [url('/faq')]) | raw }}</p>
{% if not is_admin | default(false) %}
<p>{{ __('question.faq_link', [url('/faq')]) | raw }}</p>
{% endif %}
{% endif %}
{% endblock %}