poll_detail.html 4.31 KB
Newer Older
chris's avatar
chris committed
1
{% extends "base.html" %}
2
{% load i18n %}
chris's avatar
chris committed
3

4 5
{% block menu %}
    {% if has_voted %}
chris's avatar
chris committed
6
        <a title=" {% trans 'Clear cookie, you will not be able to change your vote.' %} " href="/{{object.id}}/clear/">{% trans "Forget me" %}</a>
7
    {% endif %}
chris's avatar
chris committed
8
        <a title=" {% trans 'Export as csv spreadsheet' %} " href="/{{object.id}}/csv/">csv</a>
9 10
{% endblock %}

11
{% block title %}nuages - {{object}}{% endblock %}
chris's avatar
chris committed
12 13

{% block chapeau %}
chris's avatar
chris committed
14
    <h1>{{object}}</h1>
chris's avatar
chris committed
15
    <p class="info">
16
         {{object.description}} <br /> {% trans "Posted by" %} <code> {% if object.user %}{{object.user}}{% else %}{% trans 'Anonymous' %}{% endif %} </code> {% trans "on" %} <code> {{object.pub_date|date:"d F"}}. </code><br /> {% trans "Shared address" %}: <input type="text" name="link" style="border:0;" value="{{ object.link }}" readonly="readonly" class='adresse' />
chris's avatar
chris committed
17
    </p>
chris's avatar
chris committed
18 19 20 21 22

{% endblock %}

{% block content %}

chris's avatar
chris committed
23 24 25
<table class="bigtable">
    <tr>
        <td class='names'></td>
26
        {% for choice in object.choice_set.all %}
Christophe Siraut's avatar
Christophe Siraut committed
27 28 29 30 31
        <td class='cell-header'>{{ choice.choice|date:"d/m" }}<br />
        <font class="grey">{{ choice.choice|date:'H:i' }}</font><br />
            <span class="tooltip tooltip-header"><b> {{ choice.choice|date:'l d F'}} </b> <br />
            {{ choice.choice|date:'H:i a'}} <br />
             <font class="blue">{{ choice.details }} </font>
32 33 34
             </span>
        <div class="subl"><!-- --></div>
        </td>
chris's avatar
chris committed
35 36
        {% endfor %}    
    </tr>
chris's avatar
chris committed
37

chris's avatar
chris committed
38 39 40
    {% for bulletin in object.bulletin_set.all %}
    <tr >
        <td class='names'>{{ bulletin.voter }}</td>
41
        {% for vote in bulletin.vote_set.all %}
chris's avatar
chris committed
42
        <td class='cell'><div class="{{ vote.voice }}">{% if vote.comment %} <div class="msg"><!-- --></div><span class="tooltip"><font class="white">{{ vote.comment }}</font></span>{% endif %}</div></td>
chris's avatar
chris committed
43
        {% endfor %}
chris's avatar
chris committed
44 45
    </tr>
    {% endfor %}
chris's avatar
chris committed
46

chris's avatar
chris committed
47 48
    <tr>
        <td class='names'></td>
49
        {% for choice in object.choice_set.all %}
chris's avatar
chris committed
50 51 52
        <td class='cell' title=" {{ choice }} "> {{ choice.votecount }} </td>
        {% endfor %}       
    </tr>      
chris's avatar
chris committed
53

chris's avatar
chris committed
54
    <tr>
55
        <form action="/{{ object.id }}/vote/" method="post"> {% csrf_token %}
chris's avatar
chris committed
56 57 58 59
        <td class='names' title=" Fill in your name ">
            <div class="blue">{% trans "Your name:" %}</div>
            {{ form.as_p }}       
        </td>
chris's avatar
chris committed
60 61

      {% for forms in vforms %}
chris's avatar
chris committed
62
      {{ vforms.management_form }}
chris's avatar
chris committed
63
      {% for form in forms %}     
chris's avatar
chris committed
64 65 66 67 68 69 70 71 72 73 74
        <td class='cell' title='{% trans " Check the little boxes to add positive answers " %}' />
            {{ form.voice }} <br />
            {{ form.comment }}
            <div class="hide">
            {{ form.choice }}
            {% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
            </div>
            {{ field.errors }}
        </td>      
        {% endfor %}
        {% endfor %}
chris's avatar
chris committed
75 76 77
    </tr>
</table>

78
<br />
79
<h3>{% trans "Instructions" %}</h3>
80 81
<table class="instructions">
    <tr>
82
        <td>1. {% trans "Point columns to see choice details and comments" %} </td>
83
        <td style="border-left: 1px solid #fff;">2. {% trans "Check the boxes for positive answers. " %} {%trans "You may provide a comment for each choice." %}</td>
84
        <td style="background-color:#fff;"><div style="text-align:center;"><input type="submit" value='{% trans "Vote" %}' style="padding:5px;margin-right: 5px;width: 70px" /></td><td style="width:1px"></td>
85 86 87
    </tr>
</table>

chris's avatar
chris committed
88
        </form>
chris's avatar
chris committed
89

90
    <br />
91
    <h3>{% trans "Details" %}</h3>
chris's avatar
chris committed
92
    {% for choice in object.choice_set.all %} 
93
        <p class="indent" id='info-{{ choice }}'>
94
        <span class="da">{{ choice.choice|date:"l d F, H:i a"}} </span> -
95
        <span class="blue">{{ choice.details }}</span>&nbsp; ({{ choice.votecount }})<br />
chris's avatar
chris committed
96 97 98 99 100

            {% for bulletin in object.bulletin_set.all %}
                {% for vote in bulletin.vote_set.all %}
                    {% ifequal choice vote.choice %}
                        {% if vote.comment %}
101
                            <span><code>{{ bulletin.voter }}</code>: {{ vote.comment }} &nbsp</span><br />
chris's avatar
chris committed
102 103 104 105 106 107
                        {% endif %}
                    {% endifequal %}
                {% endfor %}
            {% endfor %}

        </p>
chris's avatar
chris committed
108
    {% endfor %}
chris's avatar
chris committed
109 110 111 112 113

<!--[if lt IE 8]> 
    <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script> 
<![endif]--> 

chris's avatar
chris committed
114
{% endblock %}
chris's avatar
chris committed
115