mirror of https://gitlab.crans.org/bde/nk20
Two colomn profile page
This commit is contained in:
parent
43fd765a34
commit
45ce2eab9e
|
@ -126,6 +126,10 @@ class UserDetailView(LoginRequiredMixin, DetailView):
|
||||||
club_list = \
|
club_list = \
|
||||||
Membership.objects.all().filter(user=user).only("club")
|
Membership.objects.all().filter(user=user).only("club")
|
||||||
context['club_list'] = ClubTable(club_list)
|
context['club_list'] = ClubTable(club_list)
|
||||||
|
context['title'] = _("Account #%(id)s: %(username)s") % {
|
||||||
|
'id': user.pk,
|
||||||
|
'username': user.username,
|
||||||
|
}
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2020-02-21 11:52+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -90,7 +90,7 @@ msgstr ""
|
||||||
msgid "phone number"
|
msgid "phone number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: apps/member/models.py:29 templates/member/profile_detail.html:18
|
#: apps/member/models.py:29 templates/member/profile_detail.html:23
|
||||||
msgid "section"
|
msgid "section"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ msgstr ""
|
||||||
msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
|
msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: apps/member/models.py:36 templates/member/profile_detail.html:20
|
#: apps/member/models.py:36 templates/member/profile_detail.html:26
|
||||||
msgid "address"
|
msgid "address"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ msgstr ""
|
||||||
msgid "memberships"
|
msgid "memberships"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: apps/member/views.py:63 templates/member/profile_detail.html:29
|
#: apps/member/views.py:63 templates/member/profile_detail.html:39
|
||||||
msgid "Update Profile"
|
msgid "Update Profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -188,6 +188,11 @@ msgstr ""
|
||||||
msgid "An alias with a similar name already exists."
|
msgid "An alias with a similar name already exists."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: apps/member/views.py:129
|
||||||
|
#, python-format
|
||||||
|
msgid "Account #%(id)s: %(username)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: apps/note/admin.py:118 apps/note/models/transactions.py:86
|
#: apps/note/admin.py:118 apps/note/models/transactions.py:86
|
||||||
msgid "source"
|
msgid "source"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -285,7 +290,7 @@ msgstr ""
|
||||||
msgid "alias"
|
msgid "alias"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: apps/note/models/notes.py:199
|
#: apps/note/models/notes.py:199 templates/member/profile_detail.html:32
|
||||||
msgid "aliases"
|
msgid "aliases"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -381,7 +386,7 @@ msgstr ""
|
||||||
msgid "Membership duration"
|
msgid "Membership duration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:22
|
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:29
|
||||||
msgid "balance"
|
msgid "balance"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -397,23 +402,27 @@ msgstr ""
|
||||||
msgid "Regenerate token"
|
msgid "Regenerate token"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:12
|
#: templates/member/profile_detail.html:10
|
||||||
msgid "first name"
|
msgid "first name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:14
|
#: templates/member/profile_detail.html:13
|
||||||
msgid "username"
|
msgid "username"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:27
|
#: templates/member/profile_detail.html:16
|
||||||
msgid "Manage auth token"
|
msgid "password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:30
|
#: templates/member/profile_detail.html:19
|
||||||
msgid "Change password"
|
msgid "Change password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:38
|
#: templates/member/profile_detail.html:37
|
||||||
|
msgid "Manage auth token"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: templates/member/profile_detail.html:49
|
||||||
msgid "View my memberships"
|
msgid "View my memberships"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2020-02-21 11:52+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -85,7 +85,7 @@ msgstr "adhérent"
|
||||||
msgid "phone number"
|
msgid "phone number"
|
||||||
msgstr "numéro de téléphone"
|
msgstr "numéro de téléphone"
|
||||||
|
|
||||||
#: apps/member/models.py:29 templates/member/profile_detail.html:18
|
#: apps/member/models.py:29 templates/member/profile_detail.html:23
|
||||||
msgid "section"
|
msgid "section"
|
||||||
msgstr "section"
|
msgstr "section"
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ msgstr "section"
|
||||||
msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
|
msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
|
||||||
msgstr "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
|
msgstr "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\""
|
||||||
|
|
||||||
#: apps/member/models.py:36 templates/member/profile_detail.html:20
|
#: apps/member/models.py:36 templates/member/profile_detail.html:26
|
||||||
msgid "address"
|
msgid "address"
|
||||||
msgstr "adresse"
|
msgstr "adresse"
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ msgstr "adhésion"
|
||||||
msgid "memberships"
|
msgid "memberships"
|
||||||
msgstr "adhésions"
|
msgstr "adhésions"
|
||||||
|
|
||||||
#: apps/member/views.py:63 templates/member/profile_detail.html:29
|
#: apps/member/views.py:63 templates/member/profile_detail.html:39
|
||||||
msgid "Update Profile"
|
msgid "Update Profile"
|
||||||
msgstr "Modifier le profil"
|
msgstr "Modifier le profil"
|
||||||
|
|
||||||
|
@ -187,6 +187,11 @@ msgstr "Modifier le profil"
|
||||||
msgid "An alias with a similar name already exists."
|
msgid "An alias with a similar name already exists."
|
||||||
msgstr "Un alias avec un nom similaire existe déjà."
|
msgstr "Un alias avec un nom similaire existe déjà."
|
||||||
|
|
||||||
|
#: apps/member/views.py:129
|
||||||
|
#, python-format
|
||||||
|
msgid "Account #%(id)s: %(username)s"
|
||||||
|
msgstr "Compte n°%(id)s : %(username)s"
|
||||||
|
|
||||||
#: apps/note/admin.py:118 apps/note/models/transactions.py:86
|
#: apps/note/admin.py:118 apps/note/models/transactions.py:86
|
||||||
msgid "source"
|
msgid "source"
|
||||||
msgstr "source"
|
msgstr "source"
|
||||||
|
@ -285,7 +290,7 @@ msgstr "Alias invalide"
|
||||||
msgid "alias"
|
msgid "alias"
|
||||||
msgstr "alias"
|
msgstr "alias"
|
||||||
|
|
||||||
#: apps/note/models/notes.py:199
|
#: apps/note/models/notes.py:199 templates/member/profile_detail.html:32
|
||||||
msgid "aliases"
|
msgid "aliases"
|
||||||
msgstr "alias"
|
msgstr "alias"
|
||||||
|
|
||||||
|
@ -381,7 +386,7 @@ msgstr "L'adhésion finie le"
|
||||||
msgid "Membership duration"
|
msgid "Membership duration"
|
||||||
msgstr "Durée de l'adhésion"
|
msgstr "Durée de l'adhésion"
|
||||||
|
|
||||||
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:22
|
#: templates/member/club_detail.html:18 templates/member/profile_detail.html:29
|
||||||
msgid "balance"
|
msgid "balance"
|
||||||
msgstr "solde du compte"
|
msgstr "solde du compte"
|
||||||
|
|
||||||
|
@ -397,23 +402,29 @@ msgstr "Créé le"
|
||||||
msgid "Regenerate token"
|
msgid "Regenerate token"
|
||||||
msgstr "Regénérer le jeton"
|
msgstr "Regénérer le jeton"
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:12
|
#: templates/member/profile_detail.html:10
|
||||||
msgid "first name"
|
msgid "first name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:14
|
#: templates/member/profile_detail.html:13
|
||||||
msgid "username"
|
msgid "username"
|
||||||
msgstr "nom d'utilisateur"
|
msgstr "nom d'utilisateur"
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:27
|
#: templates/member/profile_detail.html:16
|
||||||
msgid "Manage auth token"
|
#, fuzzy
|
||||||
msgstr "Gérer les jetons d'authentification"
|
#| msgid "Change password"
|
||||||
|
msgid "password"
|
||||||
|
msgstr "Changer le mot de passe"
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:30
|
#: templates/member/profile_detail.html:19
|
||||||
msgid "Change password"
|
msgid "Change password"
|
||||||
msgstr "Changer le mot de passe"
|
msgstr "Changer le mot de passe"
|
||||||
|
|
||||||
#: templates/member/profile_detail.html:38
|
#: templates/member/profile_detail.html:37
|
||||||
|
msgid "Manage auth token"
|
||||||
|
msgstr "Gérer les jetons d'authentification"
|
||||||
|
|
||||||
|
#: templates/member/profile_detail.html:49
|
||||||
msgid "View my memberships"
|
msgid "View my memberships"
|
||||||
msgstr "Voir mes adhésions"
|
msgstr "Voir mes adhésions"
|
||||||
|
|
||||||
|
|
|
@ -2,34 +2,45 @@
|
||||||
{% load i18n static pretty_money django_tables2 %}
|
{% load i18n static pretty_money django_tables2 %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>Compte n° {{ object.pk }}</h3>
|
<div class="row mt-4">
|
||||||
|
<div class="col-md-3">
|
||||||
<img src="{{ object.note.display_image.url }}" alt=""/>
|
<img src="{{ object.note.display_image.url }}" alt=""/>
|
||||||
|
|
||||||
<dl class="row">
|
<dl class="row table">
|
||||||
<dt class="col-6 col-md-3">{% trans 'name'|capfirst %}</dt>
|
<dt class="col-xl-6">{% trans 'name'|capfirst %}, {% trans 'first name' %}</dt>
|
||||||
<dd class="col-6 col-md-3">{{ object.user.last_name }}</dd>
|
<dd class="col-xl-6">{{ object.user.last_name }} {{ object.user.first_name }}</dd>
|
||||||
<dt class="col-6 col-md-3">{% trans 'first name'|capfirst %}</dt>
|
|
||||||
<dd class="col-6 col-md-3">{{ object.user.first_name }}</dd>
|
|
||||||
<dt class="col-6 col-md-3">{% trans 'username'|capfirst %}</dt>
|
|
||||||
<dd class="col-6 col-md-3">{{ object.user.username }}</dd>
|
|
||||||
<dt class="col-6 col-md-3">Aliases</dt>
|
|
||||||
<dd class="col-6 col-md-3">{{ object.user.note.alias_set.all }}</dd>
|
|
||||||
<dt class="col-6 col-md-3">{% trans 'section'|capfirst %}</dt>
|
|
||||||
<dd class="col-6 col-md-3">{{ object.section }}</dd>
|
|
||||||
<dt class="col-6 col-md-3">{% trans 'address'|capfirst %}</dt>
|
|
||||||
<dd class="col-6 col-md-3">{{ object.address }}</dd>
|
|
||||||
<dt class="col-6 col-md-3">{% trans 'balance'|capfirst %}</dt>
|
|
||||||
<dd class="col-6 col-md-3">{{ object.user.note.balance | pretty_money }}</dd>
|
|
||||||
</dl>
|
|
||||||
<center>
|
|
||||||
{% if object.user.pk == user.pk %}
|
|
||||||
<a class="btn btn-primary" href="{% url 'member:auth_token' %}">{% trans 'Manage auth token' %}</a>
|
|
||||||
{% endif %}
|
|
||||||
<a class="btn btn-primary" href="{% url 'member:user_update_profile' object.pk %}">{% trans 'Update Profile' %}</a>
|
|
||||||
<a class="btn btn-primary" href="{% url 'password_change' %}">{% trans 'Change password' %}</a>
|
|
||||||
</center>
|
|
||||||
|
|
||||||
|
<dt class="col-xl-6">{% trans 'username'|capfirst %}</dt>
|
||||||
|
<dd class="col-xl-6">{{ object.user.username }}</dd>
|
||||||
|
|
||||||
|
<dt class="col-xl-6">{% trans 'password'|capfirst %}</dt>
|
||||||
|
<dd class="col-xl-6">
|
||||||
|
<a class="badge badge-primary" href="{% url 'password_change' %}">
|
||||||
|
{% trans 'Change password' %}
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt class="col-xl-6">{% trans 'section'|capfirst %}</dt>
|
||||||
|
<dd class="col-xl-6">{{ object.section }}</dd>
|
||||||
|
|
||||||
|
<dt class="col-xl-6">{% trans 'address'|capfirst %}</dt>
|
||||||
|
<dd class="col-xl-6">{{ object.address }}</dd>
|
||||||
|
|
||||||
|
<dt class="col-xl-6">{% trans 'balance'|capfirst %}</dt>
|
||||||
|
<dd class="col-xl-6">{{ object.user.note.balance | pretty_money }}</dd>
|
||||||
|
|
||||||
|
<dt class="col-xl-6">{% trans 'aliases'|capfirst %}</dt>
|
||||||
|
<dd class="col-xl-6">{{ object.user.note.alias_set.all|join:", " }}</dd>
|
||||||
|
</dl>
|
||||||
|
<p class="text-center">
|
||||||
|
{% if object.user.pk == user.pk %}
|
||||||
|
<a class="btn btn-info btn-sm" href="{% url 'member:auth_token' %}">{% trans 'Manage auth token' %}</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="btn btn-primary btn-sm" href="{% url 'member:user_update_profile' object.pk %}">{% trans 'Update Profile' %}</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-9">
|
||||||
<div class="accordion" id="accordionProfile">
|
<div class="accordion" id="accordionProfile">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header" id="headingOne">
|
<div class="card-header" id="headingOne">
|
||||||
|
@ -46,6 +57,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header" id="headingTwo">
|
<div class="card-header" id="headingTwo">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
|
@ -61,8 +73,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue