From 46dce1bf43310961810146e13c42a9fab0ac989a Mon Sep 17 00:00:00 2001
From: Mira Weller
{% eventurl event "presale:event.timemachine" as time_machine_link %} {% blocktrans trimmed with time_machine_link=time_machine_link %} To view your shop at different points in time, you can enable - time machine. + time machine. {% endblocktrans %}
{% elif request.event_domain or request.organizer_domain %} @@ -138,7 +138,7 @@ {% url "control:event.transfer_session" event=event.slug organizer=event.organizer.slug as time_machine_link %} {% blocktrans trimmed with time_machine_link=time_machine_link %} To view your shop at different points in time, you can enable - time machine. + time machine. {% endblocktrans %} {% endif %} diff --git a/src/pretix/presale/views/event.py b/src/pretix/presale/views/event.py index bc31b2d987..adedaeb9c1 100644 --- a/src/pretix/presale/views/event.py +++ b/src/pretix/presale/views/event.py @@ -942,6 +942,8 @@ class EventTimeMachine(EventViewMixin, TemplateView): super().setup(request, *args, **kwargs) if not has_time_machine_permission(request, request.event): raise PermissionDenied(_('You are not allowed to access time machine mode.')) + if not request.event.testmode: + raise PermissionDenied(_('This feature is only available in test mode.')) self.timemachine_form = TimemachineForm( data=request.method == 'POST' and request.POST or None, initial=( diff --git a/src/pretix/static/pretixpresale/scss/_event.scss b/src/pretix/static/pretixpresale/scss/_event.scss index 4fe11b76b9..e04fc19660 100644 --- a/src/pretix/static/pretixpresale/scss/_event.scss +++ b/src/pretix/static/pretixpresale/scss/_event.scss @@ -188,18 +188,17 @@ div.front-page { margin-top: 30px; } .offline-banner { + background: $brand-danger; + color: white; width: 100%; padding: 5px; text-align: center; a, .btn-link { text-decoration: underline; + color: white; } } -.offline-banner { background: $brand-danger; color: white; } -.offline-banner a { color: white; } -.timemachine-banner { background: $brand-warning; } -.timemachine-banner a, .timemachine-banner .btn-link { color: $text-color; } #questions_group .panel-title a { line-height: 22px; }