Added ordering by name to group personnel lists in edit and about views. This ordering is by the person's profile name, without attempting to determine which name part is family name or given name. Fixes #2184.
- Legacy-Id: 12817
This commit is contained in:
parent
761ed8a723
commit
0922c6c984
|
@ -79,7 +79,7 @@ def fill_in_charter_info(group, include_drafts=False):
|
|||
group.areadirector = getattr(group.ad_role(),'email',None)
|
||||
|
||||
personnel = {}
|
||||
for r in Role.objects.filter(group=group).select_related("email", "person", "name"):
|
||||
for r in Role.objects.filter(group=group).order_by('person__name').select_related("email", "person", "name"):
|
||||
if r.name_id not in personnel:
|
||||
personnel[r.name_id] = []
|
||||
personnel[r.name_id].append(r)
|
||||
|
|
|
@ -380,7 +380,7 @@ def edit(request, group_type=None, acronym=None, action="edit"):
|
|||
)
|
||||
|
||||
for slug in roles_for_group_type(group_type):
|
||||
init[slug + "_roles"] = Email.objects.filter(role__group=group, role__name=slug)
|
||||
init[slug + "_roles"] = Email.objects.filter(role__group=group, role__name=slug).order_by('role__person__name')
|
||||
else:
|
||||
init = dict(ad=request.user.person.id if group_type == "wg" and has_role(request.user, "Area Director") else None,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue