Commit 13d2cc5d authored by Claude Paroz's avatar Claude Paroz

Fixed team_detail indentation and added group.id

parent a86bb961
......@@ -47,22 +47,26 @@ def team(request, team_slug):
try:
team = Team.objects.get(name=team_slug)
mem_groups = (
{'title': _("Committers"),
{'id': 'committers',
'title': _("Committers"),
'members': team.get_committers_exact(),
'form': None,
'no_member': _("No committers")
},
{'title': _("Reviewers"),
{'id': 'reviewers',
'title': _("Reviewers"),
'members': team.get_reviewers_exact(),
'form': None,
'no_member': _("No reviewers")
},
{'title': _("Translators"),
{'id': 'translators',
'title': _("Translators"),
'members': team.get_translators_exact(),
'form': None,
'no_member': _("No translators")
},
{'title': _("Inactive members"),
{'id': 'inactive',
'title': _("Inactive members"),
'members': team.get_inactive_members(),
'form': None,
'no_member': _("No inactive members")
......
......@@ -81,33 +81,34 @@ $(document).ready(function() {
{% for group in mem_groups %}
<h3>{{ group.title }}</h3>
<div id="{{ group.id }}">
{% if group.form %}
<form action="{{ request.path }}" method="POST">
{% csrf_token %}
<ul class="foot">
{% for field in group.form.get_fields %}
<li>{{ field.label|safe }} {{ field }}</li>
{% endfor %}
</ul>
{{ group.form.form_type }}
<input type="submit" value="{% trans 'Apply modifications' %}">
</form>
{% else %}
{% if not group.members %}
<p><em>{{ group.no_member }}</em></p>
{% else %}
<ul class="foot">
{% for member in group.members %}
<li><a href="{{ member.get_absolute_url }}"
<form action="{{ request.path }}" method="POST">
{% csrf_token %}
<ul class="foot">
{% for field in group.form.get_fields %}
<li>{{ field.label|safe }} {{ field }}</li>
{% endfor %}
</ul>
{{ group.form.form_type }}
<input type="submit" value="{% trans 'Apply modifications' %}">
</form>
{% else %}
{% if not group.members %}
<p><em>{{ group.no_member }}</em></p>
{% else %}
<ul class="foot">
{% for member in group.members %}
<li><a href="{{ member.get_absolute_url }}"
{% if can_edit_team %}
title="{% blocktrans with member.last_login|date as last_login %}Last login on {{ last_login }}{% endblocktrans %}"
{% endif %}>{{ member.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment