From 1ed1cd33e8df59a11f0dfd8e20a7dc25cb5f8c34 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 19 Jul 2021 13:40:44 +0200 Subject: [PATCH] Consistent styling for filter forms --- src/pretix/control/forms/filter.py | 2 +- .../pretixcontrol/checkin/checkins.html | 65 ++++++++------- .../pretixcontrol/checkin/index.html | 39 +++++---- .../templates/pretixcontrol/events/index.html | 46 +++++------ .../templates/pretixcontrol/orders/index.html | 80 ++++++++++--------- .../pretixcontrol/orders/refunds.html | 27 ++++--- .../pretixcontrol/organizers/customers.html | 43 +++++----- .../pretixcontrol/organizers/detail.html | 64 ++++++++------- .../pretixcontrol/organizers/giftcards.html | 41 +++++----- .../pretixcontrol/organizers/index.html | 31 ++++--- .../pretixcontrol/organizers/teams.html | 27 ++++--- .../pretixcontrol/search/orders.html | 59 ++++++++------ .../pretixcontrol/subevents/index.html | 4 +- .../templates/pretixcontrol/users/index.html | 39 +++++---- .../pretixcontrol/vouchers/index.html | 71 ++++++++-------- 15 files changed, 348 insertions(+), 290 deletions(-) diff --git a/src/pretix/control/forms/filter.py b/src/pretix/control/forms/filter.py index c601079366..10ff9fa884 100644 --- a/src/pretix/control/forms/filter.py +++ b/src/pretix/control/forms/filter.py @@ -1008,7 +1008,7 @@ class GiftCardFilterForm(FilterForm): required=False ) state = forms.ChoiceField( - label=_('Empty'), + label=_('Status'), choices=( ('', _('All')), ('empty', _('Empty')), diff --git a/src/pretix/control/templates/pretixcontrol/checkin/checkins.html b/src/pretix/control/templates/pretixcontrol/checkin/checkins.html index c9cd9b9730..c9514849ce 100644 --- a/src/pretix/control/templates/pretixcontrol/checkin/checkins.html +++ b/src/pretix/control/templates/pretixcontrol/checkin/checkins.html @@ -4,40 +4,45 @@ {% block title %}{% trans "Check-in history" %}{% endblock %} {% block inside %}

{% trans "Check-in history" %}

-
-
-
- {% bootstrap_field filter_form.checkin_list layout='inline' %} +
+
+

{% trans "Filter" %}

+
+ +
+
+ {% bootstrap_field filter_form.checkin_list %} +
+
+ {% bootstrap_field filter_form.status %} +
+
+ {% bootstrap_field filter_form.type %} +
+
+ {% bootstrap_field filter_form.device %} +
+
+ {% bootstrap_field filter_form.datetime_from %} +
+
+ {% bootstrap_field filter_form.datetime_until %} +
+
+ {% bootstrap_field filter_form.gate %} +
+
+ {% bootstrap_field filter_form.itemvar %} +
-
- {% bootstrap_field filter_form.status layout='inline' %} -
-
- {% bootstrap_field filter_form.type layout='inline' %} -
-
- {% bootstrap_field filter_form.device layout='inline' %} -
-
- {% bootstrap_field filter_form.datetime_from layout='inline' %} -
-
- {% bootstrap_field filter_form.datetime_until layout='inline' %} -
-
- {% bootstrap_field filter_form.gate layout='inline' %} -
-
- {% bootstrap_field filter_form.itemvar layout='inline' %} -
-
-
-
- + +
{% if checkins|length == 0 %}

diff --git a/src/pretix/control/templates/pretixcontrol/checkin/index.html b/src/pretix/control/templates/pretixcontrol/checkin/index.html index 5c3a973e4d..7cb5f34691 100644 --- a/src/pretix/control/templates/pretixcontrol/checkin/index.html +++ b/src/pretix/control/templates/pretixcontrol/checkin/index.html @@ -27,25 +27,30 @@ {% trans "CSV" %} -

-
- {% bootstrap_field filter_form.user layout='inline' %} +
+
+

{% trans "Filter" %}

-
- {% bootstrap_field filter_form.status layout='inline' %} -
-
- {% bootstrap_field filter_form.item layout='inline' %} -
-
- -
- + +
+ +
{% if entries|length == 0 %}

diff --git a/src/pretix/control/templates/pretixcontrol/events/index.html b/src/pretix/control/templates/pretixcontrol/events/index.html index 09156466a2..95d4f8446a 100644 --- a/src/pretix/control/templates/pretixcontrol/events/index.html +++ b/src/pretix/control/templates/pretixcontrol/events/index.html @@ -24,32 +24,30 @@

{% trans "Filter" %}

-
-
-
-
- {% bootstrap_field filter_form.query layout='inline' %} -
-
- {% bootstrap_field filter_form.status layout='inline' %} -
-
- {% bootstrap_field filter_form.organizer layout='inline' %} -
- {% for mf in meta_fields %} -
- {% bootstrap_field mf layout='inline' %} -
- {% endfor %} + +
+
+ {% bootstrap_field filter_form.query %}
-
- +
+ {% bootstrap_field filter_form.status %}
- -
+
+ {% bootstrap_field filter_form.organizer %} +
+ {% for mf in meta_fields %} +
+ {% bootstrap_field mf %} +
+ {% endfor %} +
+
+ +
+

diff --git a/src/pretix/control/templates/pretixcontrol/orders/index.html b/src/pretix/control/templates/pretixcontrol/orders/index.html index 0685f789dc..ff45418c7b 100644 --- a/src/pretix/control/templates/pretixcontrol/orders/index.html +++ b/src/pretix/control/templates/pretixcontrol/orders/index.html @@ -39,50 +39,56 @@

{% else %} -
-
-
- - + +

+ + -

-
-
-
- {% bootstrap_field filter_form.status layout='inline' %} -
- {% if request.event.has_subevents %} -
- {% bootstrap_field filter_form.item layout='inline' %} +

+ +
+
+

+ {% trans "Filter" %} +

+
+
+
+
+ {% bootstrap_field filter_form.query %}
- {% bootstrap_field filter_form.subevent layout='inline' %} + {% bootstrap_field filter_form.status %}
-
- {% bootstrap_field filter_form.provider layout='inline' %} -
- {% else %} -
- {% bootstrap_field filter_form.item layout='inline' %} -
-
- {% bootstrap_field filter_form.provider layout='inline' %} -
- {% endif %} -
- {% bootstrap_field filter_form.query layout='inline' %} + {% if request.event.has_subevents %} +
+ {% bootstrap_field filter_form.item %} +
+
+ {% bootstrap_field filter_form.subevent %} +
+
+ {% bootstrap_field filter_form.provider %} +
+ {% else %} +
+ {% bootstrap_field filter_form.item %} +
+
+ {% bootstrap_field filter_form.provider %} +
+ {% endif %}
-
- -
-
- - +
+ + {% trans "Advanced search" %} +
diff --git a/src/pretix/control/templates/pretixcontrol/orders/refunds.html b/src/pretix/control/templates/pretixcontrol/orders/refunds.html index 275ef88363..94d8af5cef 100644 --- a/src/pretix/control/templates/pretixcontrol/orders/refunds.html +++ b/src/pretix/control/templates/pretixcontrol/orders/refunds.html @@ -7,20 +7,23 @@ {% block title %}{% trans "Refunds" %}{% endblock %} {% block content %}

{% trans "Refunds" %}

-
-
-
- {% bootstrap_field filter_form.status layout='inline' %} +
+
+

{% trans "Filter" %}

+
+ +
+
+ {% bootstrap_field filter_form.status %} +
+
+ {% bootstrap_field filter_form.provider %} +
-
- {% bootstrap_field filter_form.provider layout='inline' %} -
-
-
diff --git a/src/pretix/control/templates/pretixcontrol/organizers/customers.html b/src/pretix/control/templates/pretixcontrol/organizers/customers.html index 3ebe36a6c2..b6c2e81600 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/customers.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/customers.html @@ -17,25 +17,30 @@

{% else %} -
-
- {% bootstrap_field filter_form.query layout='inline' %} +
+
+

{% trans "Filter" %}

-
- {% bootstrap_field filter_form.status layout='inline' %} -
-
- {% bootstrap_field filter_form.memberships layout='inline' %} -
-
- -
- +
+
+
+ {% bootstrap_field filter_form.query layout='inline' %} +
+
+ {% bootstrap_field filter_form.status layout='inline' %} +
+
+ {% bootstrap_field filter_form.memberships layout='inline' %} +
+
+
+ +
+
+
@@ -72,7 +77,7 @@ diff --git a/src/pretix/control/templates/pretixcontrol/organizers/detail.html b/src/pretix/control/templates/pretixcontrol/organizers/detail.html index fa83742913..9195982355 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/detail.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/detail.html @@ -5,15 +5,15 @@

{% blocktrans with name=request.organizer.name %}Organizer: {{ name }}{% endblocktrans %}

- {% if "can_create_events" in request.orgapermset %} -

- - - {% trans "Create a new event" %} - -

- {% endif %} {% if events|length == 0 and not filter_form.filtered %} + {% if "can_create_events" in request.orgapermset %} +

+ + + {% trans "Create a new event" %} + +

+ {% endif %}

{% trans "You currently do not have access to any events." %}

@@ -22,30 +22,36 @@

{% trans "Filter" %}

-
-
-
-
- {% bootstrap_field filter_form.query layout='inline' %} -
-
- {% bootstrap_field filter_form.status layout='inline' %} -
- {% for mf in meta_fields %} -
- {% bootstrap_field mf layout='inline' %} -
- {% endfor %} + +
+
+ {% bootstrap_field filter_form.query %}
-
- +
+ {% bootstrap_field filter_form.status %}
- -
+ {% for mf in meta_fields %} +
+ {% bootstrap_field mf %} +
+ {% endfor %} +
+
+ +
+
+ {% if "can_create_events" in request.orgapermset %} +

+ + + {% trans "Create a new event" %} + +

+ {% endif %}
{{ c.name }} + class="btn btn-default btn-sm" data-toggle="tooltip" title="{% trans "Details" %}">
diff --git a/src/pretix/control/templates/pretixcontrol/organizers/giftcards.html b/src/pretix/control/templates/pretixcontrol/organizers/giftcards.html index f4addac577..1daa0c664a 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/giftcards.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/giftcards.html @@ -21,25 +21,30 @@ {% else %} - -
- {% bootstrap_field filter_form.query layout='inline' %} +
+
+

{% trans "Filter" %}

-
- {% bootstrap_field filter_form.testmode layout='inline' %} -
-
- {% bootstrap_field filter_form.state layout='inline' %} -
-
- -
- +
+
+
+ {% bootstrap_field filter_form.query %} +
+
+ {% bootstrap_field filter_form.testmode %} +
+
+ {% bootstrap_field filter_form.state %} +
+
+
+ +
+ +

{% trans "Manually issue a gift card" %} diff --git a/src/pretix/control/templates/pretixcontrol/organizers/index.html b/src/pretix/control/templates/pretixcontrol/organizers/index.html index 4f9bfb4923..0660d1fc62 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/index.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/index.html @@ -6,20 +6,27 @@ {% block title %}{% trans "Organizers" %}{% endblock %} {% block content %}

{% trans "Organizers" %}

-

{% trans "The list below shows all organizer accounts you have administrative access to." %}

-
-
- {% bootstrap_field filter_form.query layout='inline' %} +

{% trans "The list below shows all organizer accounts you have administrative access to." %}

+
+
+

+ {% trans "Filter" %} +

-
- -
- + +
+ +
{% if staff_session %}

diff --git a/src/pretix/control/templates/pretixcontrol/organizers/teams.html b/src/pretix/control/templates/pretixcontrol/organizers/teams.html index 4ed5a3ce3f..c7bea617c9 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/teams.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/teams.html @@ -7,19 +7,24 @@

{% trans "The list below shows all teams that exist within this organizer." %}

-
-
- {% bootstrap_field filter_form.query layout='inline' %} +
+
+

{% trans "Filter" %}

-
- -
- + +
+ +
{% trans "Create a new team" %} diff --git a/src/pretix/control/templates/pretixcontrol/search/orders.html b/src/pretix/control/templates/pretixcontrol/search/orders.html index 13bf6f9855..e6f297fa8d 100644 --- a/src/pretix/control/templates/pretixcontrol/search/orders.html +++ b/src/pretix/control/templates/pretixcontrol/search/orders.html @@ -7,33 +7,40 @@ {% block title %}{% trans "Order search" %}{% endblock %} {% block content %}

{% trans "Order search" %}

-
-
-
- {% bootstrap_field filter_form.query layout='inline' %} -
-
- {% bootstrap_field filter_form.status layout='inline' %} -
-
- {% bootstrap_field filter_form.organizer layout='inline' %} -
-
- {% bootstrap_field filter_form.provider layout='inline' %} -
- {% for mf in meta_fields %} -
- {% bootstrap_field mf layout='inline' %} +
+
+

+ {% trans "Filter" %} +

+
+ +
+
+ {% bootstrap_field filter_form.query %}
- {% endfor %} -
-
- -
- +
+ {% bootstrap_field filter_form.status %} +
+
+ {% bootstrap_field filter_form.organizer %} +
+
+ {% bootstrap_field filter_form.provider %} +
+ {% for mf in meta_fields %} +
+ {% bootstrap_field mf %} +
+ {% endfor %} +
+
+ +
+ +
diff --git a/src/pretix/control/templates/pretixcontrol/subevents/index.html b/src/pretix/control/templates/pretixcontrol/subevents/index.html index 1a6a835ce0..551469e2fc 100644 --- a/src/pretix/control/templates/pretixcontrol/subevents/index.html +++ b/src/pretix/control/templates/pretixcontrol/subevents/index.html @@ -55,9 +55,7 @@
diff --git a/src/pretix/control/templates/pretixcontrol/users/index.html b/src/pretix/control/templates/pretixcontrol/users/index.html index 72508a6b70..dd431c4652 100644 --- a/src/pretix/control/templates/pretixcontrol/users/index.html +++ b/src/pretix/control/templates/pretixcontrol/users/index.html @@ -5,25 +5,30 @@ {% block title %}{% trans "Users" %}{% endblock %} {% block content %}

{% trans "Users" %}

-
-
- {% bootstrap_field filter_form.query layout='inline' %} +
+
+

{% trans "Filter" %}

-
- {% bootstrap_field filter_form.status layout='inline' %} -
-
- {% bootstrap_field filter_form.superuser layout='inline' %} -
-
- -
- + +
+ +

diff --git a/src/pretix/control/templates/pretixcontrol/vouchers/index.html b/src/pretix/control/templates/pretixcontrol/vouchers/index.html index 5ef613e4a4..94d80c2782 100644 --- a/src/pretix/control/templates/pretixcontrol/vouchers/index.html +++ b/src/pretix/control/templates/pretixcontrol/vouchers/index.html @@ -12,47 +12,50 @@ reserve some quota for your very special guests. {% endblocktrans %}

-
-
-
- - + +

+ + -

- -
-
- {% bootstrap_field filter_form.search layout='inline' %} -
-
- {% bootstrap_field filter_form.tag layout='inline' %} -
- {% if request.event.has_subevents %} -
- {% bootstrap_field filter_form.status layout='inline' %} +

+ +
+
+

{% trans "Filter" %}

+
+
+
+
+ {% bootstrap_field filter_form.search %}
-
- {% bootstrap_field filter_form.subevent layout='inline' %} + {% if request.event.has_subevents %} +
+ {% bootstrap_field filter_form.tag %} +
+
+ {% bootstrap_field filter_form.subevent %} +
+ {% else %} +
+ {% bootstrap_field filter_form.tag %} +
+ {% endif %} +
+ {% bootstrap_field filter_form.status %}
- {% else %} -
- {% bootstrap_field filter_form.status layout='inline' %} +
+ {% bootstrap_field filter_form.itemvar %} +
+
+ {% bootstrap_field filter_form.qm %}
- {% endif %} -
- {% bootstrap_field filter_form.itemvar layout='inline' %}
-
- {% bootstrap_field filter_form.qm layout='inline' %} -
-
-