Mark elected candidates in beamer view.

This commit is contained in:
Emanuel Schuetze 2011-09-06 07:33:13 +02:00
parent 8cd0ac8778
commit cdfb6b24e3
3 changed files with 12 additions and 9 deletions

View File

@ -9,6 +9,8 @@
<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;">

View File

@ -1,5 +1,9 @@
{% extends "beamer.html" %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% 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 %}
{% trans "Election" %}:
<h1>{{ item.assignment }}</h1>
@ -47,12 +51,10 @@
<tr class="{% cycle 'odd' '' %}">
<td class="candidate">
{% with vote|first as candidate %}
{{ candidate.0 }}
{% if candidate.1 %}
{% trans 'not elected' %}
{% else %}
{% trans 'elected' %}
<a class="elected"><img src="/static/images/icons/games-highscores.png" title="{% trans 'Candidate is elected' %}"></a>
{% endif %}
{{ candidate.0 }}
{% endwith %}
</td>
{% for v in vote|last %}
@ -62,7 +64,7 @@
<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">{% endif %}
{% if v != "-" %}<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}">{% endif %}
{{ v }}
{% endif %}
{% else %}&empty;{% endif %}

View File

@ -149,14 +149,13 @@
{% if perms.assignment.can_manage_assignment %}
<a class="election_link elected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'></a>
{% else %}
<img src="/static/images/icons/games-highscores.png" title="{% trans 'Participant is elected' %}">
<a class="elected"><img src="/static/images/icons/games-highscores.png" title="{% trans 'Candidate is elected' %}"></a>
{% endif %}
{% else %}
{% if perms.assignment.can_manage_assignment %}
<a class="election_link" href='{% url assignment_user_elected assignment.id candidate.0.id %}'></a>
{% endif %}
{% endif %}
{{ candidate.0 }}
{% endwith %}
</td>
@ -167,7 +166,7 @@
<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">{% endif %}
{% if v != "-" %}<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}">{% endif %}
{{ v }}
{% endif %}
{% else %}&empty;{% endif %}