Updated application projector view.

This commit is contained in:
Emanuel Schuetze 2011-09-08 18:57:11 +02:00
parent e6f1e64ffa
commit 475b7a1ffe

View File

@ -2,27 +2,38 @@
{% load tags %} {% load tags %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %} {% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %} {% block content %}
<div class="number">{% trans "Application" %} #{{ item.application.number }}</div>
<h1>{{ item.title }}</h1>
{% if item.application.status != "pub" and item.application.status != "per" %}
<div id="sidebar"> <div id="sidebar">
<div class="box"> <div class="box">
<h4>{%trans "Status" %}:</h4> <p><b>{%trans "Status" %}:</b><br>
{%trans item.application.get_status_display %} {% if item.application.status != "pub" %}
{%trans item.application.get_status_display %}
<br>
{% else %}
{% for note in item.application.notes %}
{{ note }}
{% endfor %}
{% endif %}
</p>
{% with item.application.poll_set.all as poll %} <p><b>{% trans "Submitter" %}:</b><br>
{% if poll|length > 0 %} {{ item.application.submitter }}</p>
<h4>{% trans "Poll result" %}:</h4> {% with item.application.poll_set.all as polls %}
{% for p in poll %} {% if polls|length > 0 and polls.0.has_vote %}
<p><b>{% trans "Poll result" %}:</b></p>
{% for p in polls %}
{% if p.has_vote %} {% if p.has_vote %}
{% if poll|length > 1 %} {% if polls|length > 1 %}
{{forloop.counter}}. {% trans "Poll" %}:<br>&nbsp;&nbsp;&nbsp; {{forloop.counter}}. {% trans "Vote" %}:<br>
{% endif %} {% endif %}
{% for option in p.get_options %} {% for option in p.options %}
{% trans "Yes" %}: {{ option.voteyes }} <br>&nbsp;&nbsp;&nbsp; <img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {{ option.yes }} <br>
{% trans "No" %}: {{ option.voteno }} <br>&nbsp;&nbsp;&nbsp; <img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {{ option.no }} <br>
{% trans "Abstention" %}: {{ option.voteundesided }} <img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {{ option.undesided }}<br>
<img src="/static/images/icons/voting-invalid.png" title="{% trans 'Invalid' %}"> {{ p.votesinvalid }}<br>
<div style="border-top: 1px solid; padding-top: 5px; margin: 5px 0; width: 5em;">
<img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> {{ p.votescast }}
</div>
{% endfor %} {% endfor %}
<br> <br>
{% else %} {% else %}
@ -33,15 +44,17 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endwith %} {% endwith %}
</div> </div>
</div> </div>
{% endif %}
<h1>{% trans "Application No." %} {{ item.application.number }}</h1>
<b>{{ item.title }}</b>
<p> <p>
<div class="text">{{ item.application.text|linebreaks }}</div> <div class="text">{{ item.application.public_version.text|linebreaks }}</div>
<br> {% if item.application.public_version.reason %}
<div class="reason"><p><b>{% trans "Reason" %}:</b></p> <br>
{{ item.application.reason|linebreaks }}</div> <div class="reason"><p><b>{% trans "Reason" %}:</b></p>
{{ item.application.public_version.reason|linebreaks }}</div>
{% endif %}
</p> </p>
{% endblock %} {% endblock %}