Pass the description to the template

This commit is contained in:
2011-01-11 14:44:40 +00:00
parent a0176667ea
commit e24ae338d1
2 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ def group_list(request):
fixed = not group.groupinformation.type == GROUP_TYPE_PERMISSION
pending = group.requests.filter(status=REQUEST_PENDING,user=request.user).count()
group_list.append((group.id, group.name, status, requestable, fixed, pending))
group_list.append((group.id, group.name, group.description, status, requestable, fixed, pending))
return render_to_response('groups/group_list.html', locals(), context_instance=RequestContext(request))

View File

@@ -9,9 +9,9 @@
<table>
{% if group_list %}
<tr><th>Group Name</th><th>Description</th><th>Status</th><th>Actions</th></tr>
{% for id, group, status, requestable, fixed, pending in group_list %}
{% for id, group, description, status, requestable, fixed, pending in group_list %}
<tr><td>{{ group }}</td>
<td>{{ group.description }}</td>
<td>{{ description }}</td>
<td>{% if pending %}Request Pending{% else %}{% if status %}{{ status }}{% endif %}{% endif %}</td>
<td>{% ifequal status None %}{% if requestable %}<a href="{% url groups.views.create_request id %}">Request Membership</a>{% endif %}{% endifequal %}
{% if not fixed and status %}<a href="{% url groups.views.kick_member id request.user.id %}">Leave</a>&nbsp;{% endif %}