Show in all views the email of nominee

show the candidate phone in nomination feedback
Fixes #1011
 - Legacy-Id: 5703
This commit is contained in:
Emilio Jiménez 2013-05-07 20:25:30 +00:00
parent 424a454fbb
commit 34ec539ff2
7 changed files with 19 additions and 8 deletions

View file

@ -101,7 +101,7 @@ class Nominee(models.Model):
unique_together = ('email', 'nomcom')
def __unicode__(self):
return u'%s' % self.email.get_name()
return u'%s' % self.email.formatted_email()
class NomineePosition(models.Model):

View file

@ -39,7 +39,7 @@ def add_num_nominations(user, position, nominee):
else:
mark = """<span style="white-space: pre;"> </span> """
return '<span title="%d earlier comments from you on %s as %s">%s</span>&nbsp;' % (count, nominee, position, mark)
return '<span title="%d earlier comments from you on %s as %s">%s</span>&nbsp;' % (count, nominee.email.address, position, mark)
@register.filter

View file

@ -62,7 +62,7 @@ table.nominees tr td {
<tr><th>{{ p.name }}:</th></tr>
{% for np in p.nomineeposition_set.accepted.not_duplicated %}
<tr>
<td><a href="{% url nomcom_private_feedback year %}?nominee={{np.nominee.id}}&position={{ np.position.id}}">{{ np.nominee.email.person.name }}</td>
<td><a href="{% url nomcom_private_feedback year %}?nominee={{np.nominee.id}}&position={{ np.position.id}}">{{ np.nominee }}</td>
</tr>
{% endfor %}
{% endif %}

View file

@ -61,10 +61,11 @@ table.nominees tr td {
<table class="nominees">
{% for p in positions %}
{% if p.nomineeposition_set.accepted.not_duplicated %}
<tr><th>{{ p.name }}:</th></tr>
<tr>
<th>{{ p.name }}:</th></tr>
{% for np in p.nomineeposition_set.accepted.not_duplicated %}
<tr>
<td>{% add_num_nominations user np.position np.nominee %}<a href="{% url nomcom_public_feedback year %}?nominee={{np.nominee.id}}&position={{ np.position.id}}">{{ np.nominee.email.person.name }}</td>
<td>{% add_num_nominations user np.position np.nominee %}<a href="{% url nomcom_public_feedback year %}?nominee={{np.nominee.id}}&position={{ np.position.id}}">{{ np.nominee }}</td>
</tr>
{% endfor %}
{% endif %}

View file

@ -30,7 +30,7 @@ The message that will be sent is shown below the address entry form.
{% for nominee in nominees %}
<tr class="{{ forloop.counter|divisibleby:2|yesno:"oddrow,evenrow" }}">
<td><input class="batch-select" type="checkbox" value="{{ nominee.id }}" name="selected" checked="checked"/></td>
<td>{{ nominee.email }}</td>
<td>{{ nominee }}</td>
<td>{% for nominee_position in nominee.nomineeposition_set.all %}{% ifequal nominee_position.state.slug "pending" %} {{ nominee_position.position.name }}, {% endifequal %}{% endfor %}</td>
</tr>
{% endfor %}

View file

@ -21,7 +21,7 @@
</tr>
{% for nominee in nominees %}
<tr class="{{ forloop.counter|divisibleby:2|yesno:"oddrow,evenrow" }}">
<td><a href="{% url nomcom_view_feedback_nominee year nominee.id %}#comment">{{ nominee.email.person.name }}</td>
<td><a href="{% url nomcom_view_feedback_nominee year nominee.id %}#comment">{{ nominee }}</td>
<td>{{ nominee.feedback_set.nominations.count }}</td>
<td>{{ nominee.feedback_set.comments.count }}</td>
<td>{{ nominee.feedback_set.questionnaires.count }}</td>

View file

@ -15,7 +15,7 @@
<p>Back to list of <a href="{% url nomcom_view_feedback year %}">nominees</a></p>
<h2>Feedback of {{ nominee.email.person.name }} </h2>
<h2>Feedback of {{ nominee }} </h2>
<div id="mytabs" class="yui-navset">
<ul class="yui-nav">
@ -40,6 +40,16 @@
{% ifequal feedback.type.slug ft.slug %}
<div>
<h3 class="ietf-divider">From {{ feedback.author|get_person|default:"Anonymous" }} ({{ feedback.time|date:"Y-m-d" }})</h3>
{% ifequal ft.slug "nomina" %}
{% for fn in feedback.nomination_set.all %}
{% if fn.candidate_name %}
<p><b>Candidate name:</b> {{ fn.candidate_name }}</p>
{% endif %}
{% if fn.candidate_phone %}
<p><b>Candidate phone:</b> {{ fn.candidate_phone }}</p>
{% endif %}
{% endfor %}
{% endifequal %}
<b>Positions:</b> {{ feedback.positions.all|join:"," }}
<p>
{% decrypt feedback.comments request year %}