Merged in [10159] from rcross@amsl.com:

Improve secretariat rolodex roles section, sort and identify concluded groups.
 - Legacy-Id: 10180
Note: SVN reference [10159] has been migrated to Git commit 1145751a9b
This commit is contained in:
Henrik Levkowetz 2015-10-10 11:35:41 +00:00
commit 9fa41c42a3
3 changed files with 8 additions and 9 deletions

View file

@ -2,6 +2,7 @@
branch/iola/automatic-doc-name-search-r10126 @ 10158
branch/iola/docalias-primary-key-r10101 @ 10111
branch/amsl/liaisons/6.4.1 @ 10160 # Merged separately
personal/lars/6.2.1.dev0@9970 # Requires the timeline work
personal/lars/6.0.5.dev0@9734 # Obsoleted - don't use 'bleach'

View file

@ -274,9 +274,11 @@ def view(request, id):
# must filter for active emails only
person.emails = person.email_set.filter(active=True)
roles = person.role_set.all().order_by('name__name','group__acronym')
return render_to_response('rolodex/view.html', {
'person': person},
'person': person,
'roles': roles},
RequestContext(request, {}),
)

View file

@ -39,18 +39,14 @@
</tr>
</thead>
<tbody>
{% for role in person.role_set.all %}
{% for role in roles %}
<tr>
<td>{{ role.name }} </td>
<td>
{% if role.group.type.slug == "wg" %}
<a href="{% url "groups_view" acronym=role.group.acronym %}">{{ role.group.acronym }}</a>
{% if role.group.type.slug == "area" %}
<a href="{% url "areas_view" name=role.group.acronym %}">{{ role.group.acronym }}{% if role.group.state.slug == "conclude" %} (concluded){% endif %}</a>
{% else %}
{% if role.group.type.slug == "area" %}
<a href="{% url "areas_view" name=role.group.acronym %}">{{ role.group.acronym }}</a>
{% else %}
{{ role.group }}
{% endif %}
<a href="{% url "groups_view" acronym=role.group.acronym %}">{{ role.group.acronym }}{% if role.group.state.slug == "conclude" %} (concluded){% endif %}</a>
{% endif %}
</td>
<td>{{ role.email }}</td>