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 %} {% for member in group.user_set.all %}
<p>{{ member }}</p> <p>{{ member }}</p>
{% empty %}
<p>{% trans "This group has not any members." %}</p>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}

View File

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