Added ordering to Role, and a roles section at the top of the personal profile page.
- Legacy-Id: 12931
This commit is contained in:
parent
5928bd9faa
commit
089f23f011
|
@ -270,6 +270,9 @@ class Role(models.Model):
|
|||
def formatted_email(self):
|
||||
return formataddr((self.person.plain_name(), self.email.address))
|
||||
|
||||
class Meta:
|
||||
ordering = ['name_id', ]
|
||||
|
||||
class RoleHistory(models.Model):
|
||||
# RoleHistory doesn't have a time field as it's not supposed to be
|
||||
# used on its own - there should always be a GroupHistory
|
||||
|
|
|
@ -33,8 +33,33 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<h2 id="roles">Roles</h2>
|
||||
{% if person.role_set.exists %}
|
||||
<table class="table">
|
||||
{% for role in person.role_set.all %}
|
||||
{% if role.group.state_id == 'active' or role.group.state_id == 'bof' %}
|
||||
{% if role.group.acronym != 'secretariat' %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ role.name.name }}
|
||||
{% if role.group.type_id == 'sdo' %}for{% elif role.name_id == 'reviewer' %}in{% else %}of{% endif %}
|
||||
<a href="{% url 'ietf.group.views.group_about' acronym=role.group.acronym %}">{{ role.group.name }}</a>
|
||||
(<a href="{% url 'ietf.group.views.group_about' acronym=role.group.acronym %}">{{ role.group.acronym }}</a>)
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:{{role.email.address}}">{{ role.email.address }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h2>RFCs</h2>
|
||||
<h2 id="rfcs">RFCs</h2>
|
||||
{% if person.rfcs %}
|
||||
<table class="table">
|
||||
{% for doc in person.rfcs %}
|
||||
|
@ -50,7 +75,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h2>Active Drafts</h2>
|
||||
<h2 id="drafts">Active Drafts</h2>
|
||||
{% if person.active_drafts.exists %}
|
||||
<list>
|
||||
{% for doc in person.active_drafts %}
|
||||
|
|
Loading…
Reference in a new issue