Skip to content

Commit 6e3bb37

Browse files
committed
Merged in [7935] from liudapeng@chinamobile.com:
Add brief_display function in Constraint class to display both WG conflict and person conflict. Fixes issue ietf-tools#1384. - Legacy-Id: 7938 Note: SVN reference [7935] has been migrated to Git commit 425f88c
1 parent df77742 commit 6e3bb37

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

ietf/meeting/models.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,16 @@ class Constraint(models.Model):
723723
def __unicode__(self):
724724
return u"%s %s target=%s person=%s" % (self.source, self.name.name.lower(), self.target, self.person)
725725

726+
def brief_display(self):
727+
if self.target and self.person:
728+
return u"%s ; %s" % (self.target.acronym, self.person)
729+
elif self.target and not self.person:
730+
return u"%s " % (self.target.acronym)
731+
elif not self.target and self.person:
732+
return u"%s " % (self.person)
733+
734+
735+
726736
@property
727737
def person_conflicted(self):
728738
if self.person is None:

ietf/templates/meeting/requests.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h2><a name="{{session.group.parent.acronym}}">{{session.group.parent.acronym|up
5555
<td valign="top">
5656
{% if session.group.ad %}<a href="mailto:{{session.group.ad.email_address}}">{{session.group.ad}}</a> {%endif%}
5757
</td>
58-
<td width="30%" valign="top">{%if session.requested_duration%}<span>{% for constraint in session.constraints %}{%ifchanged%}</span><span class="{{constraint.name.slug}}">{%endifchanged%} {{constraint.target.acronym}}{% if constraint.target.parent.id == constraint.source.parent.id%} ({{constraint.target.parent.acronym}}){%endif%}{%if not forloop.last %},{%endif%} {% endfor %}</span>{%endif%}</td>
58+
<td width="30%" valign="top">{%if session.requested_duration%}<span>{% for constraint in session.constraints %}{%ifchanged%}</span><span class="{{constraint.name.slug}}">{%endifchanged%} {% if constraint %} {% if not forloop.first %}, {%endif%}{{constraint.brief_display}}{% if constraint.target.parent.id == constraint.source.parent.id%} ({{constraint.target.parent.acronym}}){%endif%} {% endif %} {% endfor %}</span>{%endif%}</td>
5959
<td width="30%" valign="top">{% if session.comments %}<i><font color="#800000">{{session.comments|linebreaksbr}}</font></i>{% endif %}</td>
6060
</tr>
6161
{% endif %}

0 commit comments

Comments
 (0)