aboutsummaryrefslogtreecommitdiffhomepage
path: root/apioforum/templates
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-06-28 23:48:33 +0000
committerubq323 <ubq323>2021-06-28 23:48:33 +0000
commitedbd48340de9add59bcf34f312ae036adae8dcfd (patch)
tree53241bc56c1fd689d841abad73208c14ede30354 /apioforum/templates
parentcd8b3aa2c5abd414068c8f9f5edbebab807153eb (diff)
displayation of vote retractions
Diffstat (limited to 'apioforum/templates')
-rw-r--r--apioforum/templates/view_thread.html30
1 files changed, 18 insertions, 12 deletions
diff --git a/apioforum/templates/view_thread.html b/apioforum/templates/view_thread.html
index 622cf06..b999658 100644
--- a/apioforum/templates/view_thread.html
+++ b/apioforum/templates/view_thread.html
@@ -33,21 +33,27 @@
{% set vote = votes[post.id] %}
{% set option_idx = vote.option_idx %}
- {% set option = poll.options[option_idx-1] %}
- {% set footer %}
- {% if vote.current %}
- {{post.author}} votes for {{option_idx}}: {{option.text}}
- {% else %}
- {{post.author}} voted for {{option_idx}}: {{option.text}}, but later changed their vote
- {% endif %}
- {% endset %}
+ {# this is bad but it's going to get refactored anyway #}
+ {% set footer %}
+ {% if vote.is_retraction %}
+ {{post.author}} retracted their vote
+ {% else %}
+ {% set option = poll.options[option_idx-1] %}
+ {% if vote.current %}
+ {{post.author}} votes for {{option_idx}}: {{option.text}}
+ {% else %}
+ {{post.author}} voted for {{option_idx}}: {{option.text}}, but later changed their vote
+ {% endif %}
+ {% endif %}
- {{ disp_post(post, buttons=True, footer=footer) }}
-
+ {% endset %}
+
+ {{ disp_post(post, buttons=True, footer=footer) }}
+
{% else %}
- {{ disp_post(post, buttons=True) }}
- {% endif %}
+ {{ disp_post(post, buttons=True) }}
+ {% endif %}
{% endfor %}
</div>
{% if g.user %}