Merged in [8136] from denghui@chinamobile.com:
add revision number for ballot input Fixes issue #911.
- Legacy-Id: 8144
Note: SVN reference [8136] has been migrated to Git commit 9371ca969f
This commit is contained in:
commit
6036a09dca
|
@ -636,6 +636,9 @@ class DocEvent(models.Model):
|
|||
doc = models.ForeignKey('doc.Document')
|
||||
desc = models.TextField()
|
||||
|
||||
def get_dochistory(self):
|
||||
return DocHistory.objects.filter(time__lte=self.time,doc__name=self.doc.name).order_by('-time').first()
|
||||
|
||||
def __unicode__(self):
|
||||
return u"%s %s by %s at %s" % (self.doc.name, self.get_type_display().lower(), self.by.plain_name(), self.time)
|
||||
|
||||
|
|
|
@ -61,12 +61,12 @@
|
|||
<h2 id="{{ p.ad.plain_name|slugify }}" class="ad-ballot-comment">{% if p.old_ad %}[{% endif %}{{ p.ad.plain_name }}{% if p.old_ad %}]{% endif %}</h2>
|
||||
|
||||
{% if p.pos.blocking and p.discuss %}
|
||||
<p><b>{{ p.pos.name }} ({{ p.discuss_time|date:"Y-m-d" }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
|
||||
<p><b>{{ p.pos.name }} ({{ p.discuss_time|date:"Y-m-d" }} for -{{ p.get_dochistory.rev }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
|
||||
<pre>{{ p.discuss|wrap_text:80 }}</pre>
|
||||
{% endif %}
|
||||
|
||||
{% if p.comment %}
|
||||
<p><b>Comment ({{ p.comment_time|date:"Y-m-d" }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
|
||||
<p><b>Comment ({{ p.comment_time|date:"Y-m-d" }} for -{{ p.get_dochistory.rev }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
|
||||
<pre>{{ p.comment|wrap_text:80 }}</pre>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue