lostplaces-backend/django_lostplaces/lostplaces/templates/partials/voting.html

36 lines
1.1 KiB
HTML

{% load i18n %}
<div class="LP-Voting">
<div class="LP-Voting__Left">
<h2 class="LP-Headline">
Place level
</h2>
<div class="LP-Voting__Choices">
{% for choice in voting.all_choices %}
<a href="{% url 'place_vote' place_id=place.id vote=choice.0 %}" class="LP-Voting__Vote {% if choice.0 <= place.level %} LP-Voting__Vote--overall{% endif %}" title="Vote place as &quot;{{choice.1}}&quot;">
<i class="mdi mdi-shield-home"></i>
<span class="LP-Voting__Label">
{{choice.1}}
</span>
</a>
{% endfor %}
</div>
<div class="LP-Voting__CurrentVote">
{{place.get_level_display}}
</div>
</div>
{% if voting.users_vote %}
<div class="LP-Voting__Right">
<div class="LP-Voting__Info">
<div class="LP-Voting__UserVote">
<span class="LP-Voting__InfoLabel">You voted this place as</span>
<span class="LP-Voting__Vote">{{voting.users_vote.get_human_readable_level}} <i>Level {{voting.users_vote.vote}}</i></span>
</div>
<div class="LP-Voting__Expiration">
The accuracy of the voting is {{voting.accuracy}}%
</div>
</div>
</div>
{% endif %}
</div>