From dd9d59d4bf3fba9584f34aca44289ec959d57397 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sat, 3 Oct 2026 10:50:03 +0200 Subject: [PATCH] Fix issues --- .../templates/pretixcontrol/event/index.html | 6 +++++- src/pretix/control/views/utils.py | 21 +++++++++++++++++++ .../static/pretixcontrol/js/ui/dashboard.js | 13 ++++++++++++ src/pretix/static/pretixcontrol/js/ui/main.js | 1 + 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/pretix/control/templates/pretixcontrol/event/index.html b/src/pretix/control/templates/pretixcontrol/event/index.html index dd0cc12b11..a1fa072b17 100644 --- a/src/pretix/control/templates/pretixcontrol/event/index.html +++ b/src/pretix/control/templates/pretixcontrol/event/index.html @@ -66,6 +66,10 @@ {% include "pretixcontrol/event/dashboard_partial_comment.html" with url=0 %} + {% if not request.event.items.exists %} + {% include "pretixcontrol/event/dashboard_partial_welcome.html" %} + {% endif %} +
 

{% if not request.event.items.exists %} - {% include "pretixcontrol/event/dashboard_partial_welcome.html" %} + {# pass #} {% elif not request.event.has_subevents %} {% include "pretixcontrol/event/fragment_timeline.html" %}
diff --git a/src/pretix/control/views/utils.py b/src/pretix/control/views/utils.py index 5074728523..f4bbdb111c 100644 --- a/src/pretix/control/views/utils.py +++ b/src/pretix/control/views/utils.py @@ -1,3 +1,24 @@ +# +# This file is part of pretix (Community Edition). +# +# Copyright (C) 2014-2020 Raphael Michel and contributors +# Copyright (C) 2020-today pretix GmbH and contributors +# +# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General +# Public License as published by the Free Software Foundation in version 3 of the License. +# +# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are +# applicable granting you additional permissions and placing additional restrictions on your usage of this software. +# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive +# this file, see . +# +# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +# details. +# +# You should have received a copy of the GNU Affero General Public License along with this program. If not, see +# . +# from pretix.base.services.quotas import QuotaAvailability diff --git a/src/pretix/static/pretixcontrol/js/ui/dashboard.js b/src/pretix/static/pretixcontrol/js/ui/dashboard.js index ef1244dc7f..72ec1a5073 100644 --- a/src/pretix/static/pretixcontrol/js/ui/dashboard.js +++ b/src/pretix/static/pretixcontrol/js/ui/dashboard.js @@ -1,5 +1,18 @@ /* global $,gettext */ +$(function () { + // Still used on global dashboard + if ($('div[data-lazy-id]').length == 0) { + return + } + $.getJSON('widgets.json' + ($('select[name=\'subevent\']').val() ? '?subevent=' + $('select[name=\'subevent\']').val() : ''), function (data) { + $.each(data.widgets, function (_k, v) { + $('[data-lazy-id=' + v.lazy + ']').removeClass('widget-lazy-loading') + $('[data-lazy-id=' + v.lazy + '] .widget').html(v.content) + }) + }) +}) + $(function () { $('.timeline').each(function () { let $tl = $(this) diff --git a/src/pretix/static/pretixcontrol/js/ui/main.js b/src/pretix/static/pretixcontrol/js/ui/main.js index 11e697eb3d..7c858f5caf 100644 --- a/src/pretix/static/pretixcontrol/js/ui/main.js +++ b/src/pretix/static/pretixcontrol/js/ui/main.js @@ -1132,4 +1132,5 @@ htmx.on('htmx:afterSettle', (e) => { console.log("afterSwap", e) setup_basics($(e.detail.elt)) form_handlers($(e.detail.elt)) + add_log_expand_handlers($(e.detail.elt)) })