diff --git a/src/pretix/base/views/tasks.py b/src/pretix/base/views/tasks.py index 5c8f1799c7..8a9e6e9096 100644 --- a/src/pretix/base/views/tasks.py +++ b/src/pretix/base/views/tasks.py @@ -144,7 +144,12 @@ class AsyncMixin: return self.success(res.info) else: return self.error(res.info) - return render(request, 'pretixpresale/waiting.html') + state, info = res.state, res.info + return render(request, 'pretixpresale/waiting.html', { + 'started': state in ('PROGRESS', 'STARTED'), + 'percentage': info.get('value', 0) if isinstance(info, dict) else 0, + 'steps': info.get('steps', []) if isinstance(info, dict) else None, + }) def success(self, value): smes = self.get_success_message(value) diff --git a/src/pretix/presale/templates/pretixpresale/waiting.html b/src/pretix/presale/templates/pretixpresale/waiting.html index 215d845f5b..5034c696ae 100644 --- a/src/pretix/presale/templates/pretixpresale/waiting.html +++ b/src/pretix/presale/templates/pretixpresale/waiting.html @@ -21,6 +21,23 @@

{% trans "We are processing your request …" %}

+ {% if percentage %} +
+
+
+
+ {% if steps %} +
    + {% for step in steps %} +
  1. + + {{ step.label }} +
  2. + {% endfor %} +
+ {% endif %} + {% endif %} +

{% trans "If this takes longer than a few minutes, please contact us." %}

diff --git a/src/pretix/static/pretixpresale/scss/waiting.scss b/src/pretix/static/pretixpresale/scss/waiting.scss index b7b655f1b3..ff8b9c17ab 100644 --- a/src/pretix/static/pretixpresale/scss/waiting.scss +++ b/src/pretix/static/pretixpresale/scss/waiting.scss @@ -18,3 +18,18 @@ body { font-size: 200px; color: $brand-primary; } + +.progress { + max-width: 450px; + margin: 0 auto 20px; +} +.steps { + max-width: 450px; + text-align: left; + margin: 0 auto 20px; + list-style-type: none; + padding: 0; +} +@for $i from 0 through 100 { + .progress-bar-#{$i} { width: 1% * $i; } +}