poll_detail.html 4.21 KB
Newer Older
christophe siraut's avatar
christophe siraut committed
1
{% extends "base.html" %}
2
{% load i18n %}
christophe siraut's avatar
christophe siraut 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 %}
Christophe Siraut's avatar
Christophe Siraut committed
8
        <a title=" {% trans 'Export as csv spreadsheet' %} " href="/{{object.id}}/csv/">csv</a>
9
10
{% endblock %}

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

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

{% endblock %}

{% block content %}

Christophe Siraut's avatar
Christophe Siraut 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>
Christophe Siraut's avatar
Christophe Siraut committed
35
36
        {% endfor %}    
    </tr>
christophe siraut's avatar
christophe siraut committed
37

Christophe Siraut's avatar
Christophe Siraut 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 %}
Christophe Siraut's avatar
Christophe Siraut 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>
christophe siraut's avatar
christophe siraut committed
43
        {% endfor %}
Christophe Siraut's avatar
Christophe Siraut committed
44
45
    </tr>
    {% endfor %}
christophe siraut's avatar
christophe siraut committed
46

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

Christophe Siraut's avatar
Christophe Siraut committed
54
    <tr>
Christophe Siraut's avatar
Christophe Siraut committed
55
        <form action="/{{ object.id }}/vote/" method="post"> {% csrf_token %}
Christophe Siraut's avatar
Christophe Siraut committed
56
57
58
59
        <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
60
61

      {% for forms in vforms %}
Christophe Siraut's avatar
Christophe Siraut committed
62
      {{ vforms.management_form }}
christophe siraut's avatar
typos    
christophe siraut committed
63
      {% for form in forms %}     
Christophe Siraut's avatar
Christophe Siraut 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 %}
christophe siraut's avatar
christophe siraut committed
75
76
77
    </tr>
</table>

78
<br />
79
<h3>Instructions</h3>
80
81
82
83
84
85
86
87
<table class="instructions">
    <tr>
        <td>1. {% trans "Point colums to see choice details and comments" %} </td>
        <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>
        <td style="background-color:#fff;"><div style="text-align:center;"><input type="submit" value="Vote" style="padding:5px;margin-right: 5px;width: 70px" /></td><td style="width:1px"></td>
    </tr>
</table>

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

90
91
    <br />
    <h3>Details</h3>
christophe siraut's avatar
typos    
christophe siraut 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 />
christophe siraut's avatar
christophe siraut 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 />
christophe siraut's avatar
christophe siraut committed
102
103
104
105
106
107
                        {% endif %}
                    {% endifequal %}
                {% endfor %}
            {% endfor %}

        </p>
christophe siraut's avatar
typos    
christophe siraut committed
108
    {% endfor %}
Christophe Siraut's avatar
Christophe Siraut 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]--> 

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