From aa35724be259cf4299799271f89369553da406cc Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 23 Aug 2021 19:00:26 +0200 Subject: [PATCH] Better display for WEI member list Signed-off-by: Yohann D'ANELLO --- apps/wei/tables.py | 4 +- .../wei/templates/wei/weimembership_list.html | 42 ++++++++++--------- .../templates/wei/weiregistration_list.html | 32 ++++++++------ 3 files changed, 44 insertions(+), 34 deletions(-) diff --git a/apps/wei/tables.py b/apps/wei/tables.py index 45e3f2fd..a8f1e869 100644 --- a/apps/wei/tables.py +++ b/apps/wei/tables.py @@ -108,7 +108,7 @@ class WEIRegistrationTable(tables.Table): } model = WEIRegistration template_name = 'django_tables2/bootstrap4.html' - fields = ('user', 'user__first_name', 'user__last_name', 'first_year',) + fields = ('user', 'user__first_name', 'user__last_name', 'first_year', 'caution_check',) row_attrs = { 'class': 'table-row', 'id': lambda record: "row-" + str(record.pk), @@ -147,7 +147,7 @@ class WEIMembershipTable(tables.Table): model = WEIMembership template_name = 'django_tables2/bootstrap4.html' fields = ('user', 'user__last_name', 'user__first_name', 'registration__gender', 'user__profile__department', - 'year', 'bus', 'team', ) + 'year', 'bus', 'team', 'registration__caution_check', ) row_attrs = { 'class': 'table-row', 'id': lambda record: "row-" + str(record.pk), diff --git a/apps/wei/templates/wei/weimembership_list.html b/apps/wei/templates/wei/weimembership_list.html index 8e541d7a..fe9506b2 100644 --- a/apps/wei/templates/wei/weimembership_list.html +++ b/apps/wei/templates/wei/weimembership_list.html @@ -6,28 +6,32 @@ SPDX-License-Identifier: GPL-3.0-or-later {% load render_table from django_tables2 %} {% block profile_content %} - -
+
+
+ +
-
- {% if table.data %} - {% render_table table %} - {% else %} -
- {% trans "There is no membership found with this pattern." %} -
- {% endif %} +
+ {% if table.data %} + {% render_table table %} + {% else %} +
+ {% trans "There is no membership found with this pattern." %} +
+ {% endif %} +
- - - - -
- - - - + +
{% endblock %} {% block extrajavascript %} diff --git a/apps/wei/templates/wei/weiregistration_list.html b/apps/wei/templates/wei/weiregistration_list.html index 842696bb..c0c1e321 100644 --- a/apps/wei/templates/wei/weiregistration_list.html +++ b/apps/wei/templates/wei/weiregistration_list.html @@ -6,22 +6,28 @@ SPDX-License-Identifier: GPL-3.0-or-later {% load render_table from django_tables2 %} {% block profile_content %} - -
+
+
+ +
-
- {% if table.data %} - {% render_table table %} - {% else %} -
- {% trans "There is no pre-registration found with this pattern." %} -
- {% endif %} +
+ {% if table.data %} + {% render_table table %} + {% else %} +
+ {% trans "There is no pre-registration found with this pattern." %} +
+ {% endif %} +
- - - + +
{% endblock %} {% block extrajavascript %}