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/jquery.js"></script>
<script type="text/javascript" src="/static/javascript/beamer.js"></script> <script type="text/javascript" src="/static/javascript/beamer.js"></script>
<title>{% block title %} {% get_config 'event_name' %} {% endblock %}</title> <title>{% block title %} {% get_config 'event_name' %} {% endblock %}</title>
{% block header %}
{% endblock %}
</head> </head>
<body> <body>
<div id="config" style="display:none;"> <div id="config" style="display:none;">

View File

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

View File

@ -149,14 +149,13 @@
{% if perms.assignment.can_manage_assignment %} {% if perms.assignment.can_manage_assignment %}
<a class="election_link elected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'></a> <a class="election_link elected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'></a>
{% else %} {% 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 %} {% endif %}
{% else %} {% else %}
{% if perms.assignment.can_manage_assignment %} {% if perms.assignment.can_manage_assignment %}
<a class="election_link" href='{% url assignment_user_elected assignment.id candidate.0.id %}'></a> <a class="election_link" href='{% url assignment_user_elected assignment.id candidate.0.id %}'></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{{ candidate.0 }} {{ candidate.0 }}
{% endwith %} {% endwith %}
</td> </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-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> <img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
{% else %} {% 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 }} {{ v }}
{% endif %} {% endif %}
{% else %}&empty;{% endif %} {% else %}&empty;{% endif %}