From df2709ec98367669582c7ede2ebd6dca137e507a Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sun, 26 Jul 2026 22:42:40 +0200 Subject: [PATCH] Move comment form --- .../control/templates/pretixcontrol/base.html | 1 + .../event/dashboard_partial_comment.html | 17 ++++ .../event/dashboard_partial_comment_form.html | 16 ++++ .../templates/pretixcontrol/event/index.html | 79 +++++++++++-------- src/pretix/control/urls.py | 3 +- src/pretix/control/views/dashboards.py | 53 +++---------- src/pretix/control/views/event.py | 34 ++++---- src/pretix/static/htmx/htmx-2.0.10.min.js | 1 + .../static/pretixcontrol/js/ui/dashboard.js | 8 -- .../static/pretixcontrol/scss/_dashboard.scss | 12 +++ .../static/pretixcontrol/scss/main.scss | 12 +++ 11 files changed, 130 insertions(+), 106 deletions(-) create mode 100644 src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment.html create mode 100644 src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment_form.html create mode 100644 src/pretix/static/htmx/htmx-2.0.10.min.js diff --git a/src/pretix/control/templates/pretixcontrol/base.html b/src/pretix/control/templates/pretixcontrol/base.html index bf9181d22c..f7a7ed1036 100644 --- a/src/pretix/control/templates/pretixcontrol/base.html +++ b/src/pretix/control/templates/pretixcontrol/base.html @@ -23,6 +23,7 @@ {% endif %} {% compress js %} + diff --git a/src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment.html b/src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment.html new file mode 100644 index 0000000000..d40b914fc4 --- /dev/null +++ b/src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment.html @@ -0,0 +1,17 @@ +{% load i18n %} +{% load icon %} +
+ {% trans "Comment" %}: + {% if "event.settings.general:write" in request.eventpermset %} + + {% endif %} + {% if request.event.comment %} +

+ {{ request.event.comment|linebreaksbr }} +

+ {% endif %} +
diff --git a/src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment_form.html b/src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment_form.html new file mode 100644 index 0000000000..b2d5a7247f --- /dev/null +++ b/src/pretix/control/templates/pretixcontrol/event/dashboard_partial_comment_form.html @@ -0,0 +1,16 @@ +{% load i18n %} +{% load bootstrap3 %} +
+ {% csrf_token %} +
+

+ {% bootstrap_field form.comment layout="inline" show_help=True show_label=False horizontal_field_class="col-md-12" %} +

+

+ +

+
+
diff --git a/src/pretix/control/templates/pretixcontrol/event/index.html b/src/pretix/control/templates/pretixcontrol/event/index.html index 797d939e48..923f7170b9 100644 --- a/src/pretix/control/templates/pretixcontrol/event/index.html +++ b/src/pretix/control/templates/pretixcontrol/event/index.html @@ -4,9 +4,10 @@ {% load bootstrap3 %} {% load static %} {% load eventsignal %} +{% load icon %} {% block title %}{{ request.event.name }}{% endblock %} {% block content %} -

+

{{ request.event.name }} {% if request.event.has_subevents %} @@ -14,11 +15,43 @@ {% else %} {{ request.event.get_date_range_display }} {% endif %} - + {% icon "cog fa-spin" %} + +

- {% trans "Shop URL:" %} + {% trans "Shop URL:" %} {% abseventurl request.event "presale:event.index" %}
+ {% include "pretixcontrol/event/dashboard_partial_comment.html" with url=0 %} + + +
+
{% eventsignal request.event "pretix.control.signals.event_dashboard_top" request=request %} - {% if request.event.has_subevents %} -
- {% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %} -
- {% endif %} - {% if not request.event.has_subevents or subevent %} + {% if not request.event.has_subevents %} {% include "pretixcontrol/event/fragment_timeline.html" %} {% endif %} {% if widgets_override %} @@ -81,30 +116,6 @@ {% endif %}

 

-
-
-

- {% trans "Internal comment" %} -

-
-
-
- {% csrf_token %} -
- {% bootstrap_field comment_form.comment layout="horizontal" show_help=True show_label=False horizontal_field_class="col-md-12" %} -
- {% if not comment_form.readonly %} -

-
- -

- {% endif %} -
-
-
{% if "event.orders:read" in request.eventpermset or "event.orders:write" in request.eventpermset or "event.settings.general:write" in request.eventpermset or "event.items:write" in request.eventpermset %}
@@ -112,7 +123,7 @@ {% trans "Event logs" %}
-