From e5cc15ffacac8a73d563835d7078ac9e104fcd8b Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 24 Jun 2020 19:39:57 +0200 Subject: [PATCH] Improve responsiveness of organizer page --- .../pretixpresale/organizers/index.html | 171 +++++++++--------- .../static/pretixpresale/scss/main.scss | 19 ++ 2 files changed, 106 insertions(+), 84 deletions(-) diff --git a/src/pretix/presale/templates/pretixpresale/organizers/index.html b/src/pretix/presale/templates/pretixpresale/organizers/index.html index da1255a5d1..47317a85ee 100644 --- a/src/pretix/presale/templates/pretixpresale/organizers/index.html +++ b/src/pretix/presale/templates/pretixpresale/organizers/index.html @@ -8,18 +8,18 @@ {% block title %}{% trans "Event list" %}{% endblock %} {% block custom_header %} {{ block.super }} - + {% if organizer_logo %} - + {% endif %} - - + + {% endblock %} {% block content %}
- {% if organizer_homepage_text %} - {{ organizer_homepage_text | rich_text }} - {% endif %} + {% if organizer_homepage_text %} + {{ organizer_homepage_text | rich_text }} + {% endif %}
{% if "old" in request.GET %}

{% trans "Past events" %}

@@ -55,94 +55,97 @@ {% trans "Show past events" %} {% endif %} -
- - - - - - - - - - - {% for e in events %}{% eventurl e "presale:event.index" as url %} - - +
+ + {% for e in events %}{% eventurl e "presale:event.index" as url %} +
+ +
+ {% if e.settings.show_dates_on_frontpage %} -
+ {{ e.daterange|default:e.get_date_range_display }} + {% if e.settings.show_times and not e.has_subevents %} + {% timezone e.tzname %} +
+ {{ e.date_from|date:"TIME_FORMAT" }} + {% if e.settings.show_date_to and e.date_to and e.date_to.date == e.date_from.date %} + – {{ e.date_to|date:"TIME_FORMAT" }} + {% endif %} + + {% endtimezone %} + {% endif %} {% else %} - +   {% endif %} - - - {% empty %} - {% if "old" in request.GET %} - - - - {% else %} - - - - {% endif %} - {% endfor %} - -
{% trans "Name" %}{% trans "Date" %}{% trans "Status" %}
- {{ e.name }} - - {{ e.daterange|default:e.get_date_range_display }} - {% if e.settings.show_times and not e.has_subevents %} - {% timezone e.tzname %} -
- {{ e.date_from|date:"TIME_FORMAT" }} - {% if e.settings.show_date_to and e.date_to and e.date_to.date == e.date_from.date %} - – {{ e.date_to|date:"TIME_FORMAT" }} - {% endif %} - - {% endtimezone %} - {% endif %} -
  - {% if e.has_subevents %} - {% trans "Event series" %} - {% elif e.presale_is_running and request.organizer.settings.event_list_availability %} - {% if e.best_availability_state == 100 %} - {% trans "Book now" %} - {% elif e.settings.waiting_list_enabled and e.best_availability_state >= 0 %} - {% trans "Waiting list" %} - {% elif e.best_availability_state == 20 %} - {% trans "Reserved" %} - {% elif e.best_availability_state < 20 %} - {% trans "Sold out" %} - {% endif %} - {% elif e.presale_is_running %} + +
+ {% if e.has_subevents %} + {% trans "Event series" %} + {% elif e.presale_is_running and request.organizer.settings.event_list_availability %} + {% if e.best_availability_state == 100 %} {% trans "Book now" %} - {% elif e.presale_has_ended %} - {% trans "Sale over" %} - {% elif e.settings.presale_start_show_date %} - + {% elif e.settings.waiting_list_enabled and e.best_availability_state >= 0 %} + {% trans "Waiting list" %} + {% elif e.best_availability_state == 20 %} + {% trans "Reserved" %} + {% elif e.best_availability_state < 20 %} + {% trans "Sold out" %} + {% endif %} + {% elif e.presale_is_running %} + {% trans "Book now" %} + {% elif e.presale_has_ended %} + {% trans "Sale over" %} + {% elif e.settings.presale_start_show_date %} + {% blocktrans trimmed with date=e.presale_start|date:"SHORT_DATE_FORMAT" %} Sale starts {{ date }} {% endblocktrans %} + {% else %} + {% trans "Not yet on sale" %} + {% endif %} +
+
- - {% if e.has_subevents %} {% trans "Tickets" %} - {% elif e.presale_is_running and e.best_availability_state == 100 %} - {% trans "Tickets" %} - {% else %} - {% trans "More info" %} - {% endif %} - -
- {% trans "No archived events found." %} -
- {% trans "No public upcoming events found." %} -
+ +
+ + {% empty %} + {% if "old" in request.GET %} +
+ {% trans "No archived events found." %} +
+ {% else %} +
+ {% trans "No public upcoming events found." %} +
+ {% endif %} + {% endfor %} {% include "pretixpresale/pagination.html" %} {% endblock %} diff --git a/src/pretix/static/pretixpresale/scss/main.scss b/src/pretix/static/pretixpresale/scss/main.scss index 30ccb93231..1a9681504a 100644 --- a/src/pretix/static/pretixpresale/scss/main.scss +++ b/src/pretix/static/pretixpresale/scss/main.scss @@ -277,6 +277,25 @@ h2 .label { display: none !important; } +.event-list { + margin-top: 15px; + border-top: 1px solid $table-border-color; + + .row { + margin-left: 0; + margin-right: 0; + padding-top: 5px; + padding-bottom: 5px; + border-bottom: 1px solid $table-border-color; + border-left: 1px solid $table-border-color; + border-right: 1px solid $table-border-color; + } + .row > div { + padding-top: 5px; + padding-bottom: 5px; + } +} + @import "_iframe.scss"; @import "_a11y.scss"; @import "_print.scss";