From 95c2f32086b98edcdc1121bb936cfdefa1ee33bf Mon Sep 17 00:00:00 2001 From: etienne Date: Thu, 21 Aug 2008 00:40:10 +0000 Subject: Implementation of the 3 choices poll --- templates/createOrEdit.html | 9 ++++----- templates/vote.html | 32 +++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 8 deletions(-) (limited to 'templates') diff --git a/templates/createOrEdit.html b/templates/createOrEdit.html index 12d9d9d..4eecaa2 100644 --- a/templates/createOrEdit.html +++ b/templates/createOrEdit.html @@ -34,21 +34,20 @@ {% if new %}{% else %}{{poll_desc}}{% endif %} {% trans "Precise description of the poll" %} -
  • {% trans "Poll is the appropriate type for a simple multi-choice poll" %}
  • {% trans "Balanced poll lets voters setting negative vote for some choices" %}
  • -
  • {% trans "One choice poll" %}
  • + - !--> - + {% if not new %}{% if choices %} {% trans "Choices" %} {% trans "Delete?"%} diff --git a/templates/vote.html b/templates/vote.html index 0174a18..27e54a3 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -17,10 +17,28 @@ - {% for vote in voter.votes %}{%endfor%} + {% for vote in voter.votes %} + {% ifequal poll_type 'P' %} + + {% endifequal %} + {% ifequal poll_type 'B' %} + + {% endifequal %} + {%endfor%} {%else%}{% trans "Edit" %} {{voter.name}} - {% for vote in voter.votes %}{% ifequal vote.value 1%}Yes{%else%}No{%endifequal%} + {% for vote in voter.votes %} + {%ifequal poll_type 'P'%} + {%ifequal vote.value 0%}{% trans "No" %}{%else%}{% trans "Yes" %}{%endifequal%} + {%else%} + {%for VOT in VOTE%} + {%ifequal VOT.0 vote.value%}{{VOT.1}}{%endifequal%}{%endfor%} + {%endifequal%} + {%endfor%} {%endifequal%} {%endfor%} @@ -28,7 +46,15 @@ - {%for choice in choices%}{%endfor%} + {%for choice in choices%} + {% ifequal poll_type 'P' %} + {% endifequal %} + {% ifequal poll_type 'B' %} + + {% endifequal %} + {%endfor%} {%endif%} -- cgit v1.2.3