diff --git a/apps/registration/tables.py b/apps/registration/tables.py index 8aa6544..31e39c0 100644 --- a/apps/registration/tables.py +++ b/apps/registration/tables.py @@ -20,7 +20,7 @@ class RegistrationTable(tables.Table): def order_type(self, queryset, desc): types = ["volunteerregistration__adminregistration", "volunteerregistration", "participantregistration"] - return queryset.order_by(*(("" if desc else "-") + t for t in types)), True + return queryset.order_by(*(("-" if desc else "") + t for t in types)), True class Meta: attrs = { @@ -28,5 +28,5 @@ class RegistrationTable(tables.Table): } model = Registration fields = ('last_name', 'user__first_name', 'user__email', 'type',) - order_by = ('volunteerregistration__adminregistration', 'volunteerregistration', 'last_name', 'first_name',) + order_by = ('type', 'last_name', 'first_name',) template_name = 'django_tables2/bootstrap4.html' diff --git a/apps/registration/templates/registration/user_detail.html b/apps/registration/templates/registration/user_detail.html index d3ec639..69131ae 100644 --- a/apps/registration/templates/registration/user_detail.html +++ b/apps/registration/templates/registration/user_detail.html @@ -21,6 +21,15 @@
{{ user_object.email }} {% if not user_object.registration.email_confirmed %} ({% trans "Not confirmed" %}, {% trans "resend the validation link" %}){% endif %}
+ {% if user_object == user %} +
{% trans "Password:" %}
+
+ + {% trans "Change password" %} + +
+ {% endif %} + {% if user_object.registration.participates %}
{% trans "Team:" %}
{% trans "any" as any %}