From 44b7fe8f52ee8593e1ed7f9b29fdbf0cd99a36c6 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 23 Aug 2020 12:07:04 +0200 Subject: [PATCH] List aliases on profile page --- apps/member/templates/member/base.html | 7 ++- .../templates/member/profile_detail.html | 22 +++---- .../member/templates/member/profile_info.html | 58 ++++++++++--------- 3 files changed, 44 insertions(+), 43 deletions(-) diff --git a/apps/member/templates/member/base.html b/apps/member/templates/member/base.html index a27f61da..9cb4bb6b 100644 --- a/apps/member/templates/member/base.html +++ b/apps/member/templates/member/base.html @@ -1,6 +1,7 @@ {% extends "base.html" %} -{% load static i18n pretty_money %} -{% load render_table from django_tables2 %} +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +{% endcomment %} {# Use a fluid-width container #} {% block containertype %}container-fluid{% endblock %} @@ -9,10 +10,12 @@
{% block profile_info %} + {% include "member/profile_info.html" %} {% endblock %}
{% block profile_content %} + {% include "member/profile_tables.html" %} {% endblock %}
diff --git a/apps/member/templates/member/profile_detail.html b/apps/member/templates/member/profile_detail.html index 51ec3095..9df28c9f 100644 --- a/apps/member/templates/member/profile_detail.html +++ b/apps/member/templates/member/profile_detail.html @@ -1,18 +1,10 @@ {% extends "member/base.html" %} -{% block profile_info %} -{% include "member/profile_info.html" %} -{% endblock %} - -{% block profile_content %} -{% include "member/profile_tables.html" %} -{% endblock %} - {% block extrajavascript %} - -{% endblock %} + +{% endblock %} \ No newline at end of file diff --git a/apps/member/templates/member/profile_info.html b/apps/member/templates/member/profile_info.html index 5d849a0a..4d92fe7e 100644 --- a/apps/member/templates/member/profile_info.html +++ b/apps/member/templates/member/profile_info.html @@ -1,12 +1,12 @@ -{% load i18n static pretty_money perms %} +{% load i18n pretty_money perms %}
-
-

{% trans "Account #" %} {{ user_object.pk }}

+
+

{% trans "Account #" %}{{ user_object.pk }}

@@ -18,12 +18,12 @@
{{ user_object.username }}
{% if user_object.pk == user.pk %} -
{% trans 'password'|capfirst %}
-
- - {% trans 'Change password' %} - -
+
{% trans 'password'|capfirst %}
+
+ + {% trans 'Change password' %} + +
{% endif %}
{% trans 'section'|capfirst %}
@@ -33,32 +33,38 @@
{{ user_object.email }}
{% trans 'phone number'|capfirst %}
-
{{ user_object.profile.phone_number }}
+
{{ user_object.profile.phone_number }}
{% trans 'address'|capfirst %}
{{ user_object.profile.address }}
{% if "note.view_note"|has_perm:user_object.note %} -
{% trans 'balance'|capfirst %}
-
{{ user_object.note.balance | pretty_money }}
+
{% trans 'balance'|capfirst %}
+
{{ user_object.note.balance | pretty_money }}
-
{% trans 'paid'|capfirst %}
-
{{ user_object.profile.paid|yesno }}
+
{% trans 'paid'|capfirst %}
+
{{ user_object.profile.paid|yesno }}
{% endif %} - -
{% trans 'aliases'|capfirst %}
-
{{ user_object.note.alias_set.all|join:", " }}
- {% if user_object.pk == user_object.pk %} - {% trans 'Manage auth token' %} - {% endif %} +

{% trans 'aliases'|capfirst %}

+ {% for alias in user_object.note.alias_set.all %} + {{ alias }} + {% endfor %} +
- + +{% if user_object.pk == user_object.pk %} +{% trans 'Manage auth token' %} +{% endif %} \ No newline at end of file