From edd1bad62b445b0cae291f0406e7d0ca1eabf5ae Mon Sep 17 00:00:00 2001 From: etienne Date: Sun, 24 Aug 2008 22:18:42 +0000 Subject: Update of the model. Sort vote by creation date (#15). Update of poll information (#13). New poll types (#2, #5) --- templates/vote.html | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'templates/vote.html') diff --git a/templates/vote.html b/templates/vote.html index 27e54a3..566bb8e 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -11,32 +11,40 @@ - {% for choice in choices %}{{choice.name}} + {% for choice in choices %}{{choice.name}}{% if choice.limit %} ({% trans "max" %} {{choice.limit}}){%endif%} {% endfor %} {% for voter in voters %}{% ifequal current_voter_id voter.id %} - + {% for vote in voter.votes %} + {% if vote.choice.available or vote.value %} {% ifequal poll_type 'P' %} - + + {% endifequal %} + {% ifequal poll_type 'O' %} + {% endifequal %} {% ifequal poll_type 'B' %} - {% for vote_choice in VOTE %} {% endfor %} {% endifequal %} + {% else %} + {% trans "Limit reached" %} + {% endif %} {%endfor%} {%else%}{% trans "Edit" %} - {{voter.name}} + {{voter.user.name}} {% for vote in voter.votes %} - {%ifequal poll_type 'P'%} - {%ifequal vote.value 0%}{% trans "No" %}{%else%}{% trans "Yes" %}{%endifequal%} + {%ifequal poll_type 'B'%} + {%for VOT in VOTE%} + {%ifequal VOT.0 vote.value%}{{VOT.1.1}}{%endifequal%}{%endfor%} {%else%} {%for VOT in VOTE%} - {%ifequal VOT.0 vote.value%}{{VOT.1}}{%endifequal%}{%endfor%} + {%ifequal VOT.0 vote.value%}{{VOT.1.0}}{%endifequal%}{%endfor%} {%endifequal%} {%endfor%} @@ -47,19 +55,25 @@ {%for choice in choices%} + {% if choice.available %} {% ifequal poll_type 'P' %} {% endifequal %} + {% ifequal poll_type 'O' %} + {% endifequal %} {% ifequal poll_type 'B' %} {% endifequal %} + {% else %} + {% trans "Limit reached" %} + {% endif %} {%endfor%} {%endif%} {% trans "Sum" %} - {% for sum in choices_sum %}{{sum}} + {% for choice in choices %}{{choice.sum}} {% endfor %} -- cgit v1.2.3