Enhence template of UserView and GroupView

This commit is contained in:
Norman Jäckel 2012-10-31 14:47:42 +01:00
parent ac25e02e2d
commit 3b4e19ad3b
2 changed files with 17 additions and 3 deletions

View File

@ -15,6 +15,8 @@
{% for member in group.user_set.all %}
<p>{{ member }}</p>
{% empty %}
<p>{% trans "This group has not any members." %}</p>
{% endfor %}
{% endblock %}

View File

@ -14,26 +14,38 @@
<h2>{% trans "Groups" %}</h2>
<p>
{% for group in shown_user.groups.all %}
{{ group }},
{{ group }},
{% empty %}
{% trans "The participant is not member of any group." %}
{% endfor %}
</p>
<h2>{% trans "Gender" %}</h2>
<p>{{ shown_user.get_gender_display }}</p>
{% if shown_user.get_gender_display %}
<h2>{% trans "Gender" %}</h2>
<p>{{ shown_user.get_gender_display }}</p>
{% endif %}
{% if shown_user.get_type_display %}
<h2>{% trans "Type" %}</h2>
<p>{{ shown_user.get_type_display }}</p>
{% endif %}
{% if shown_user.committee %}
<h2>{% trans "Committee" %}</h2>
<p>{{ shown_user.committee }}</p>
{% endif %}
{% if perms.participant.can_manage_participant %}
{% if shown_user.comment %}
<h2>{% trans "Comment" %}</h2>
<p>{{ shown_user.comment }}</p>
{% endif %}
<h2>{% trans "Last Login" %}</h2>
{% if shown_user.last_login > shown_user.date_joined %}
<p>{{ shown_user.last_login }}</p>
{% else %}
<p>{% trans "The participant was not logged in yet." %}</p>
{% endif %}
{% endif %}