#42 Place Voting / Level
This commit is contained in:
39
django_lostplaces/lostplaces/templates/partials/voting.html
Normal file
39
django_lostplaces/lostplaces/templates/partials/voting.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% 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.get_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 "{{choice.1}}"">
|
||||
<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>
|
||||
<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.get_human_readable_level}}</span>
|
||||
</div>
|
||||
|
||||
<div class="LP-Voting__Expiration">
|
||||
<span class="LP-Voting__InfoLabel">Your vote expires on</span>
|
||||
<span class="LP-Voting__Date">
|
||||
<time datetime="{{voting.expires_when|date:'Y-m-d'}}">
|
||||
{{voting.expires_when|date:'d.m.Y'}}
|
||||
</time>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -40,25 +40,64 @@
|
||||
<p class="LP-Paragraph">{{ place.description }}</p>
|
||||
</div>
|
||||
|
||||
<section class="LP-Section">
|
||||
|
||||
{% url 'place_tag_submit' place_id=place.id as tag_submit_url%}
|
||||
{% partial tagging %}
|
||||
{% set config=tagging_config %}
|
||||
{% endpartial %}
|
||||
|
||||
</section>
|
||||
<div class="LP-Quickinfo">
|
||||
<section class="LP-Section">
|
||||
{% url 'place_tag_submit' place_id=place.id as tag_submit_url %}
|
||||
{% partial tagging %}
|
||||
{% set config=tagging_config %}
|
||||
{% endpartial %}
|
||||
</section>
|
||||
|
||||
{{votingplace.vote}}
|
||||
<section class="LP-Section">
|
||||
{% partial voting %}
|
||||
{% set place=place %}
|
||||
{% set voting=placevoting %}
|
||||
{% endpartial %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="LP-Section">
|
||||
<h1 class="LP-Headline">{% translate 'Map links' %}</h1>
|
||||
{% partial osm_map config=mapping_config %}
|
||||
<div class="LP-LinkList">
|
||||
<ul class="LP-LinkList__Container">
|
||||
<li class="LP-LinkList__Item"><a target="_blank" href="https://www.google.com/maps?q={{place.latitude|safe}},{{place.longitude|safe}}" class="LP-Link"><span class="LP-Text">Google Maps</span></a></li>
|
||||
<li class="LP-LinkList__Item"><a target="_blank" href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude|safe}},{{place.longitude|safe}}&icon=true&bg=dop" class="LP-Link"><span class="LP-Text">TIM Online</span></a></li>
|
||||
<li class="LP-LinkList__Item"><a target="_blank" href="http://www.openstreetmap.org/?mlat={{place.latitude|safe}}&mlon={{place.longitude|safe}}&zoom=16" class="LP-Link"><span class="LP-Text">OSM</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="LP-LinkList">
|
||||
<li class="LP-LinkList__Item">
|
||||
<a target="_blank" href="https://www.google.com/maps?q={{place.latitude|safe}},{{place.longitude|safe}}" class="LP-Link">
|
||||
<span class="LP-Text RV-Iconized">
|
||||
<span class="RV-Iconized__Text">
|
||||
Google Maps
|
||||
</span>
|
||||
<span class="RV-Iconized__Icon RV-Iconized__Icon--left">
|
||||
<i class="mdi mdi-map-outline"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="LP-LinkList__Item">
|
||||
<a target="_blank" href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude|safe}},{{place.longitude|safe}}&icon=true&bg=dop" class="LP-Link">
|
||||
<span class="LP-Text RV-Iconized">
|
||||
<span class="RV-Iconized__Text">
|
||||
TIM Online
|
||||
</span>
|
||||
<span class="RV-Iconized__Icon RV-Iconized__Icon--left">
|
||||
<i class="mdi mdi-map-outline"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="LP-LinkList__Item">
|
||||
<a target="_blank" href="http://www.openstreetmap.org/?mlat={{place.latitude|safe}}&mlon={{place.longitude|safe}}&zoom=16" class="LP-Link">
|
||||
<span class="LP-Text RV-Iconized">
|
||||
<span class="RV-Iconized__Text">
|
||||
OSM
|
||||
</span>
|
||||
<span class="RV-Iconized__Icon RV-Iconized__Icon--left">
|
||||
<i class="mdi mdi-map-outline"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class=" LP-Section">
|
||||
|
Reference in New Issue
Block a user