diff --git a/src/pretix/control/forms/organizer.py b/src/pretix/control/forms/organizer.py index 7469b009cd..016801180e 100644 --- a/src/pretix/control/forms/organizer.py +++ b/src/pretix/control/forms/organizer.py @@ -135,7 +135,7 @@ class OrganizerSettingsForm(SettingsForm): ) event_list_type = forms.ChoiceField( - label=_('Event overview stile'), + label=_('Default overview style'), choices=( ('list', _('List')), ('calendar', _('Calendar')) diff --git a/src/pretix/control/templates/pretixcontrol/organizers/index.html b/src/pretix/control/templates/pretixcontrol/organizers/index.html index 61e0eb166f..0564bb34b8 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/index.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/index.html @@ -1,5 +1,6 @@ {% extends "pretixcontrol/base.html" %} {% load i18n %} +{% load eventurl %} {% block title %}{% trans "Organizers" %}{% endblock %} {% block content %}

{% trans "Organizers" %}

diff --git a/src/pretix/presale/templates/pretixpresale/organizers/calendar.html b/src/pretix/presale/templates/pretixpresale/organizers/calendar.html index 16a9e40146..0dcc1b3efd 100644 --- a/src/pretix/presale/templates/pretixpresale/organizers/calendar.html +++ b/src/pretix/presale/templates/pretixpresale/organizers/calendar.html @@ -9,14 +9,27 @@ {{ organizer_homepage_text | rich_text }} {% endif %} -

{{ date|date:"F Y" }}

-
+
+

{{ date|date:"F Y" }}

+ +
-
@@ -35,7 +48,12 @@
- {% include "pretixpresale/fragment_calendar.html" %} + {% if multiple_timezones %}
{% blocktrans trimmed %} @@ -52,13 +70,4 @@ {% endblocktrans %}
{% endif %} -

- - - {% trans "Download calendar as iCal file" %} - -

- - {% include "pretixpresale/pagination.html" %} {% endblock %} diff --git a/src/pretix/presale/templates/pretixpresale/organizers/index.html b/src/pretix/presale/templates/pretixpresale/organizers/index.html index 06c3d4666e..b1be1b095a 100644 --- a/src/pretix/presale/templates/pretixpresale/organizers/index.html +++ b/src/pretix/presale/templates/pretixpresale/organizers/index.html @@ -8,18 +8,36 @@ {% if organizer_homepage_text %} {{ organizer_homepage_text | rich_text }} {% endif %} - + {% if "old" in request.GET %}

{% trans "Past events" %}

-

- {% trans "Show upcoming" %} -

{% else %}

{% trans "Upcoming events" %}

-

- {% trans "Show past events" %} -

{% endif %} +
+
+ + + {% trans "List" %} + + + + {% trans "Calendar" %} + +
+ + + {% trans "iCal" %} + + {% if "old" in request.GET %} + {% trans "Show upcoming" %} + {% else %} + {% trans "Show past events" %} + {% endif %} +
diff --git a/src/pretix/presale/urls.py b/src/pretix/presale/urls.py index ee0b91c24d..0d5e51f22b 100644 --- a/src/pretix/presale/urls.py +++ b/src/pretix/presale/urls.py @@ -76,15 +76,9 @@ event_patterns = [ organizer_patterns = [ url(r'^$', pretix.presale.views.organizer.OrganizerIndex.as_view(), name='organizer.index'), - url(r'^events/$', - pretix.presale.views.organizer.CalendarView.as_view(), - name='organizer.calendar'), url(r'^events/ical/$', pretix.presale.views.organizer.OrganizerIcalDownload.as_view(), name='organizer.ical'), - url(r'^events/(?P[0-9]{4})/(?P[0-9]{1,2})/$', - pretix.presale.views.organizer.CalendarView.as_view(), - name='organizer.calendar'), ] locale_patterns = [ diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py index 8b11be8784..a19a2d385c 100644 --- a/src/pretix/presale/views/organizer.py +++ b/src/pretix/presale/views/organizer.py @@ -27,7 +27,8 @@ class OrganizerIndex(OrganizerViewMixin, ListView): paginate_by = 30 def get(self, request, *args, **kwargs): - if request.organizer.settings.event_list_type == 'calendar': + style = request.GET.get("style", request.organizer.settings.event_list_type) + if style == "calendar": cv = CalendarView() cv.request = request return cv.get(request, *args, **kwargs) diff --git a/src/pretix/static/pretixpresale/scss/_calendar.scss b/src/pretix/static/pretixpresale/scss/_calendar.scss index ac618e0bfe..5ce20066e9 100644 --- a/src/pretix/static/pretixpresale/scss/_calendar.scss +++ b/src/pretix/static/pretixpresale/scss/_calendar.scss @@ -50,3 +50,6 @@ background: darken($brand-primary, 15%); } } +#monthselform .row > div { + margin-bottom: 15px; +}