merge 1.2-dev with default branch

This commit is contained in:
Oskar Hahn 2012-07-18 10:37:23 +00:00
commit 8f4970e16c
6 changed files with 249 additions and 0 deletions

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
{% load tags %}
<head>
<link type="text/css" rel="stylesheet" href="/static/styles/beamer.css">
<link rel="shortcut icon" href="/static/images/favicon.png" type="image/png" />
<script type="text/javascript" src="/static/javascript/jquery.js"></script>
<script type="text/javascript" src="/static/javascript/beamer.js"></script>
<title>{% block title %} {% get_config 'event_name' %} {% endblock %}</title>
{% block header %}
{% endblock %}
</head>
<body>
<div id="config" style="display:none;">
<div id="ajax">{{ ajax }}</div>
</div>
<div id="ajaxswitcher"></div>
<div id="header">
<div id="logo"><img src="/static/images/logo-beamer.png"></div>
<div class="event_name">{% get_config 'event_name' %}</div>
<div class="event_description">{% get_config 'event_description' %}</div>
</div>
<div id="currentTime">
{% now "H:i" %}
</div>
<div id="countdown">0:00</div>
<div id="content">
{% block content %}
{% endblock %}
</div>
</body>
</html>

View File

@ -0,0 +1,60 @@
{% extends "beamer.html" %}
{% load tags %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %}
<div id="sidebar">
<div class="box">
<p><b>{%trans "Status" %}:</b><br>
{% if item.application.status != "pub" %}
{%trans item.application.get_status_display %}
<br>
{% else %}
{% for note in item.application.notes %}
{{ note }}
{% endfor %}
{% endif %}
</p>
<p><b>{% trans "Submitter" %}:</b><br>
{{ item.application.submitter.profile }}</p>
{% with item.application.poll_set.all as polls %}
{% 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 polls|length > 1 %}
{{forloop.counter}}. {% trans "Vote" %}:<br>
{% endif %}
{% for option in p.options %}
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {{ option.yes }} <br>
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {{ option.no }} <br>
<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.votesinvalidf }}<br>
<div style="border-top: 1px solid; padding-top: 5px; margin: 5px 0; width: 10em;">
<img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> {{ p.votescastf }}
</div>
{% endfor %}
<br>
{% else %}
{% if poll|length == 1 %}
<i>{% trans "No poll results available." %}</i>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endwith %}
</div>
</div>
<h1>{% trans "Application No." %} {{ item.application.number }}</h1>
<b>{{ item.title }}</b>
<p>
<div class="text">{{ item.application.public_version.text|linebreaks }}</div>
{% if item.application.public_version.reason %}
<br>
<div class="reason"><p><b>{% trans "Reason" %}:</b></p>
{{ item.application.public_version.reason|linebreaks }}</div>
{% endif %}
</p>
{% endblock %}

View File

@ -0,0 +1,105 @@
{% extends "beamer.html" %}
{% block title %}{{ block.super }} - #{{ item.title }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" />
<script type="text/javascript" src="/static/javascript/assignment.js"></script>
{% endblock %}
{% block content %}
<h1>{% trans "Election" %}: {{ item.assignment }}</h1>
{% if item.assignment.status != "fin" %}
<div id="sidebar">
<div class="box">
<p><b>{% trans "Status" %}:</b><br>
{% trans item.assignment.get_status_display %}</p>
{% if item.assignment.status == "sea" or item.assignment.status == "vot" %}
<p><b>{% trans "Number of available posts" %}:</b><br>
{{ item.assignment.posts }}</p>
{% endif %}
</div>
</div>
{% endif %}
{% if not item.assignment.profile.exists %}
<p>
<div class="text">{{ item.assignment.description|linebreaks }}</div>
</p>
{% endif %}
{% if item.assignment.profile.exists and item.assignment.status != "fin" %}
<h3>{% trans "Candidates" %}</h3>
<ol>
{% for profile in item.assignment.profile.all|dictsort:"user.first_name" %}
<li>{{ profile }} </li>
{% empty %}
<li style="list-style: none outside none;">
<i>{% trans "No candidates available." %}</i>
</li>
{% endfor %}
</ol>
<p><br></p>
{% endif %}
{% with polls|first as firstpoll %}
{% if polls.count > 0 and firstpoll.published %}
<h3>{% trans "Election results" %}</h3>
<table>
<tr>
<th>{% trans "Candidates" %}</th>
{% for poll in item.assignment.poll_set.all %}
{% if poll.published %}
<th><nobr>{{forloop.counter}}. {% trans "ballot" %}</nobr></th>
{% endif %}
{% endfor %}
</tr>
{% for vote in votes %}
<tr class="{% cycle 'odd' '' %}">
{% with vote|first as candidate %}
<td class="candidate {% if candidate.1 %}elected{% endif %}">
{% if candidate.1 %}
<a class="elected"><img src="/static/images/icons/voting-yes.png" title="{% trans 'Candidate is elected' %}"></a>
{% endif %}
{{ candidate.0 }}
</td>
{% for v in vote|last %}
<td style="white-space:nowrap;" {% if candidate.1 %}class="elected"{% endif %}>{% if v %}
{% if v|length == 3 %}
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}&empty;{% endif %}<br>
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}&empty;{% endif %}<br>
<img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
{% else %}
{% if v != "-" %}<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}">{% endif %}
{{ v }}
{% endif %}
{% endif %}
</td>
{% endfor %}
{% endwith %}
</tr>
{% empty %}
<tr>
<td {% if item.assignment.profile.exist %}colspan="2"{% endif %}><i>{% trans "No ballots available." %}</i></td>
</tr>
{% endfor %}
<tr>
<td>{%trans 'Invalid votes' %}</td>
{% for p in polls %}
{% if p.published %}
<td style="white-space:nowrap;"><img src="/static/images/icons/voting-invalid.png" title="{% trans 'Invalid' %}"> {{ p.votesinvalidf }}</td>
{% endif %}
{% endfor %}
</tr>
<tr class="total">
<td><b>{%trans 'Votes cast' %}</b></td>
{% for p in polls %}
{% if p.published %}
<td style="white-space:nowrap;"><img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> <b>{{ p.votescastf }}</b></td>
{% endif %}
{% endfor %}
</tr>
</table>
{% endif %}
{% endwith %}
<br>
{% endblock %}

View File

@ -0,0 +1,19 @@
{% extends "beamer.html" %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %}
{%trans "Poll about" %}:
<h1>{{ item.title }}</h1>
<table>
{% for option in item.poll.get_options %}
<tr>
<td>{{ option }}</td>
<td>{{ option.voteyes }}</td>
{% if item.poll.optiondecision %}
<td>{{ option.voteno }}</td>
<td>{{ option.voteundesided }}</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends "beamer.html" %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %}
{% if item.text %}
<h1>{{ item.title }}</h1>
{{ item.text|safe|linebreaks }}
{% else %}
<div class="item_fullscreen">{{ item.title }}</div>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,17 @@
{% extends "beamer.html" %}
{% block title %}{{ block.super }} -
{% if title %} {{ title }} {% else %} {%trans "Agenda" %} {% endif %}
{% endblock %}
{% block content %}
{% if title %}
<h1>{{ title }}</h1>
{% else %}
<h1>{%trans "Agenda" %}</h1>
{% endif %}
<ul class="itemlist">
{% for item in items %}
<li{% if item.closed %} class="closed"{% endif %}>{{ item }}</li>
{% endfor %}
</ul>
{% endblock %}