poll_detail.html 4.29 KB
Newer Older
christophe siraut's avatar
christophe siraut committed
1
{% extends "base.html" %}
Christophe Siraut's avatar
Christophe Siraut committed
2
{% load url from future %}
3
{% load i18n %}
christophe siraut's avatar
christophe siraut committed
4

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

12
{% block title %}nuages - {{object}}{% endblock %}
christophe siraut's avatar
christophe siraut committed
13
14

{% block chapeau %}
chris's avatar
chris committed
15
    <h1>{{object}}</h1>
16
    <p class="filet">
17
         {{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' />
christophe siraut's avatar
typos    
christophe siraut committed
18
    </p>
christophe siraut's avatar
christophe siraut committed
19
20
21
22
23

{% endblock %}

{% block content %}

Christophe Siraut's avatar
Christophe Siraut committed
24
25
26
<table class="bigtable">
    <tr>
        <td class='names'></td>
27
        {% for choice in object.choice_set.all %}
Christophe Siraut's avatar
Christophe Siraut committed
28
29
30
31
32
        <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>
33
34
35
             </span>
        <div class="subl"><!-- --></div>
        </td>
Christophe Siraut's avatar
Christophe Siraut committed
36
37
        {% endfor %}    
    </tr>
christophe siraut's avatar
christophe siraut committed
38

Christophe Siraut's avatar
Christophe Siraut committed
39
40
41
    {% for bulletin in object.bulletin_set.all %}
    <tr >
        <td class='names'>{{ bulletin.voter }}</td>
42
        {% for vote in bulletin.vote_set.all %}
Christophe Siraut's avatar
Christophe Siraut committed
43
        <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>
christophe siraut's avatar
christophe siraut committed
44
        {% endfor %}
Christophe Siraut's avatar
Christophe Siraut committed
45
46
    </tr>
    {% endfor %}
christophe siraut's avatar
christophe siraut committed
47

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

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

      {% for forms in vforms %}
Christophe Siraut's avatar
Christophe Siraut committed
63
      {{ vforms.management_form }}
christophe siraut's avatar
typos    
christophe siraut committed
64
      {% for form in forms %}     
Christophe Siraut's avatar
Christophe Siraut committed
65
66
67
68
69
70
71
72
73
74
75
        <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 %}
christophe siraut's avatar
christophe siraut committed
76
77
78
    </tr>
</table>

79
<br />
80
<h3>{% trans "Instructions" %}</h3>
81
82
<table class="instructions">
    <tr>
83
        <td>1. {% trans "Point columns to see choice details and comments" %} </td>
Christophe Siraut's avatar
Christophe Siraut committed
84
85
        <td>2. {% trans "Check the boxes for positive answers. " %} {%trans "You may provide a comment for each choice." %}</td>
        <td>3. <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>
86
87
88
    </tr>
</table>

Christophe Siraut's avatar
Christophe Siraut committed
89
        </form>
christophe siraut's avatar
christophe siraut committed
90

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

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

        </p>
christophe siraut's avatar
typos    
christophe siraut committed
109
    {% endfor %}
Christophe Siraut's avatar
Christophe Siraut committed
110
111
112
113
114

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

christophe siraut's avatar
christophe siraut committed
115
{% endblock %}
Christophe Siraut's avatar
Christophe Siraut committed
116