File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1521,7 +1521,24 @@ def test_document_ballot(self):
15211521 r = self .client .get (urlreverse ("ietf.doc.views_doc.document_ballot" , kwargs = dict (name = doc .name )))
15221522 self .assertEqual (r .status_code , 200 )
15231523 self .assertContains (r , '(%s for -%s)' % (pos .comment_time .strftime ('%Y-%m-%d' ), oldrev ))
1524-
1524+
1525+ # Now simulate a new ballot against the new revision and make sure the "was" position is included
1526+ pos2 = BallotPositionDocEvent .objects .create (
1527+ doc = doc ,
1528+ rev = doc .rev ,
1529+ ballot = ballot ,
1530+ type = "changed_ballot_position" ,
1531+ pos_id = "noobj" ,
1532+ comment = "Still looks okay to me" ,
1533+ comment_time = datetime .datetime .now (),
1534+ balloter = Person .objects .get (user__username = "ad" ),
1535+ by = Person .objects .get (name = "(System)" ))
1536+
1537+ r = self .client .get (urlreverse ("ietf.doc.views_doc.document_ballot" , kwargs = dict (name = doc .name )))
1538+ self .assertEqual (r .status_code , 200 )
1539+ self .assertContains (r , pos2 .comment )
1540+ self .assertContains (r , '(was %s)' % pos .pos )
1541+
15251542 def test_document_ballot_needed_positions (self ):
15261543 # draft
15271544 doc = IndividualDraftFactory (intended_std_level_id = 'ps' )
Original file line number Diff line number Diff line change @@ -74,7 +74,9 @@ <h4><span class="label label-{{ n|pos_to_label }}"> {{ n.name }}</span></h4>
7474 {% for p in positions %}
7575 {% if not p.is_old_pos %}
7676 < h4 class ="anchor-target " id ="{{ p.balloter.plain_name|slugify }} "> {{ p.balloter.plain_name }}
77- < span class ="pull-right "> < span class ="label label-{{ p.pos|pos_to_label }} "> {{p.pos}}</ span >
77+ < span class ="pull-right ">
78+ {% if p.old_positions %}< span class ="text-muted small "> (was {{ p.old_positions|join:", " }})</ span > {% endif %}
79+ < span class ="label label-{{ p.pos|pos_to_label }} "> {{p.pos}}</ span >
7880 {% if user|has_role:"Secretariat" %}
7981 < a href ="{% url "ietf.doc.views_ballot.edit_position " name=doc.name ballot_id =ballot.pk %}?balloter ={{ p.balloter.pk }} " title="Click to edit the position of {{ p.balloter.plain_name }} " class ="btn btn-default btn-xs "> Edit</ a >
8082 {% endif %}
You can’t perform that action at this time.
0 commit comments