~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/wlpoll/poll_list.html

  • Committer: franku
  • Date: 2016-03-02 21:02:38 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160302210238-kuzuundfpu2fgiab
first partially working version with old data

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
   vim:ft=htmldjango
4
4
{% endcomment %}
5
5
 
 
6
{% block extra_head %}
 
7
{{ block.super}}
 
8
<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/wiki.css" />
 
9
{% endblock %}
 
10
 
6
11
{% load threadedcomments_tags custom_date %}
7
12
{% block title %}Poll Archive - {{ block.super }}{% endblock %}
8
13
 
9
14
{% block content %}
10
 
{% if perms.wlpoll %}
 
15
    {% if perms.wlpoll %}
11
16
        <div class="small posRight">
12
17
                {% if perms.wlpoll.poll_can_add %}<a href="/admin/wlpoll/poll/add/" class="invertedColor">Add New Poll</a>{% endif %}
13
18
        </div>
14
 
        {% endif %}
15
 
<h1>Poll Archive</h1>
16
 
<div class="blogEntry">
17
 
        <ul>
18
 
        {% for o in object_list %}
19
 
        {% get_comment_count for o as ccount %}
20
 
                <li>
21
 
                        <a href="{{o.get_absolute_url}}">{{ o.name }}</a> - <span class="small">posted at {{ o.pub_date|custom_date:user }}, {{ ccount }} comments, {{o.total_votes}} votes</span>
22
 
                </li>
23
 
        {% endfor %}
24
 
        </ul>
25
 
</div>
 
19
    {% endif %}
 
20
    <h1>Poll Archive</h1>
 
21
    <div class="blogEntry">
 
22
        <div class="post">
 
23
        <table>
 
24
            <tr>
 
25
                <th>Poll</th>
 
26
                <th>Begin</th>
 
27
                <th>End</th>
 
28
                <th>Votes</th>
 
29
                <th>Comments</th>
 
30
            </tr>
 
31
            
 
32
            {% for o in object_list %}
 
33
            {% get_comment_count for o as ccount %}
 
34
                <tr>
 
35
                <td><a href="{{o.get_absolute_url}}">{{ o.name }}</a></td>
 
36
                <td>{{ o.pub_date|custom_date:user }}</td>
 
37
                <td>{{ o.closed_date|custom_date:user }}</td>
 
38
                <td class="center">{{ ccount }}</td>
 
39
                <td class="right">{{o.total_votes}}</td>
 
40
            </tr>
 
41
            {% endfor %}
 
42
        </table>
 
43
        </div>
 
44
    </div>
26
45
{% endblock %}