From cdddc7999830e323f2769dc2ca7db24cac732448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Tue, 25 Feb 2020 14:26:03 +0100 Subject: [PATCH] make Knowledge Base templates more flexibly overidable --- helpdesk/templates/helpdesk/kb_category_base.html | 12 +++++++++--- .../helpdesk/public_create_ticket_base.html | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/helpdesk/templates/helpdesk/kb_category_base.html b/helpdesk/templates/helpdesk/kb_category_base.html index 5b449b7f..8ca89bd7 100644 --- a/helpdesk/templates/helpdesk/kb_category_base.html +++ b/helpdesk/templates/helpdesk/kb_category_base.html @@ -1,6 +1,8 @@ {% load i18n %} -

{% trans 'Knowledgebase Category' %}:{% blocktrans with category.title as kbcat %}{{ kbcat }}{% endblocktrans %}

-

{{ category.description }}

+{% block header %} +

{% blocktrans with category.title as kbcat %}{{ kbcat }}{% endblocktrans %}

+

{{ category.description|linebreaks }}

+{% endblock %}
{% for item in items %}
@@ -43,8 +45,12 @@
{% endfor %}
+{% block footer %} +{% endblock %} {% if category.queue %} + {% block submit_button %} + {% endblock %} {% endif %} diff --git a/helpdesk/templates/helpdesk/public_create_ticket_base.html b/helpdesk/templates/helpdesk/public_create_ticket_base.html index 82cf375b..45325642 100644 --- a/helpdesk/templates/helpdesk/public_create_ticket_base.html +++ b/helpdesk/templates/helpdesk/public_create_ticket_base.html @@ -3,7 +3,9 @@ {% with request|load_helpdesk_settings as helpdesk_settings %} {% if helpdesk_settings.HELPDESK_SUBMIT_A_TICKET_PUBLIC %} +{% block form_header %}

{% trans "Unless otherwise stated, all fields are required." %} {% trans "Please provide as descriptive a title and description as possible." %}

+{% endblock %}
{{ form|bootstrap4form }}