mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-23 09:16:48 +02:00
fix
This commit is contained in:
@ -9,11 +9,13 @@
|
|||||||
|
|
||||||
<dt class="col-xl-6">{% trans 'family'|capfirst %}</dt>
|
<dt class="col-xl-6">{% trans 'family'|capfirst %}</dt>
|
||||||
<dd class="col-xl-6">
|
<dd class="col-xl-6">
|
||||||
{% for family in families %}
|
{% if families %}
|
||||||
<a href="{% url 'family:family_detail' family.pk %}">{{ family.name }}</a>{% if not forloop.last %}, {% endif %}
|
{% for fam in families %}
|
||||||
{% empty %}
|
<a href="{% url 'family:family_detail' fam.pk %}">{{ fam.name }}</a>{% if not forloop.last %}, {% endif %}
|
||||||
<em>{% trans 'None' %}</em>
|
{% endfor %}
|
||||||
{% endfor %}
|
{% else %}
|
||||||
|
<span class="text-muted">Aucune</span>
|
||||||
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
{% if user_object.pk == user.pk %}
|
{% if user_object.pk == user.pk %}
|
||||||
|
@ -93,9 +93,6 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView):
|
|||||||
if fields_modifiable:
|
if fields_modifiable:
|
||||||
context['profile_form'] = profile_form
|
context['profile_form'] = profile_form
|
||||||
|
|
||||||
families = Family.objects.filter(members=user).distinct()
|
|
||||||
context["families"] = families
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
@ -211,6 +208,9 @@ class UserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
|
|||||||
context["can_unlock_note"] = not user.note.is_active and PermissionBackend\
|
context["can_unlock_note"] = not user.note.is_active and PermissionBackend\
|
||||||
.check_perm(self.request, "note.change_noteuser_is_active", modified_note)
|
.check_perm(self.request, "note.change_noteuser_is_active", modified_note)
|
||||||
|
|
||||||
|
families = Family.objects.filter(members__user=user).distinct()
|
||||||
|
context["families"] = families
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user