[damned-lies] Fixed team_detail indentation and added group.id



commit 13d2cc5d5cfb8b4cb675b4fac1bb8b2320311e88
Author: Claude Paroz <claude 2xlibre net>
Date:   Wed Oct 30 09:01:11 2013 +0100

    Fixed team_detail indentation and added group.id

 teams/views.py                   |   12 ++++++---
 templates/teams/team_detail.html |   47 +++++++++++++++++++------------------
 2 files changed, 32 insertions(+), 27 deletions(-)
---
diff --git a/teams/views.py b/teams/views.py
index e598646..ce9f883 100644
--- a/teams/views.py
+++ b/teams/views.py
@@ -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")
diff --git a/templates/teams/team_detail.html b/templates/teams/team_detail.html
index f831fe6..873ba8a 100644
--- a/templates/teams/team_detail.html
+++ b/templates/teams/team_detail.html
@@ -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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]