Added icon and style information for elected/not elected candidates.
This commit is contained in:
parent
4fb4691f14
commit
8cd0ac8778
@ -145,12 +145,19 @@
|
||||
<tr class="{% cycle 'odd' '' %}">
|
||||
<td class="candidate">
|
||||
{% with vote|first as candidate %}
|
||||
{{ candidate.0 }}
|
||||
{% if candidate.1 %}
|
||||
<a class="election_link iselected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'>{% trans 'not elected' %}</a>
|
||||
{% if perms.assignment.can_manage_assignment %}
|
||||
<a class="election_link elected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'></a>
|
||||
{% else %}
|
||||
<a class="election_link" href='{% url assignment_user_elected assignment.id candidate.0.id %}'>{% trans 'elected' %}</a>
|
||||
<img src="/static/images/icons/games-highscores.png" title="{% trans 'Participant is elected' %}">
|
||||
{% 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>
|
||||
{% for v in vote|last %}
|
||||
|
BIN
openslides/static/images/icons/games-highscores-grey.png
Normal file
BIN
openslides/static/images/icons/games-highscores-grey.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -1,5 +1,5 @@
|
||||
$(function() {
|
||||
$('a.iselected').parent().parent().children('td').addClass('iselected');
|
||||
$('a.elected').parent().parent().children('td').addClass('elected');
|
||||
|
||||
|
||||
|
||||
@ -11,15 +11,14 @@ $(function() {
|
||||
url: line.attr('href'),
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (line.hasClass('iselected') && !data.elected) {
|
||||
line.removeClass('iselected')
|
||||
line.parent().parent().children('td').removeClass('iselected')
|
||||
} else if (!line.hasClass('iselected') && data.elected) {
|
||||
line.addClass('iselected')
|
||||
line.parent().parent().children('td').addClass('iselected')
|
||||
if (line.hasClass('elected') && !data.elected) {
|
||||
line.removeClass('elected')
|
||||
line.parent().parent().children('td').removeClass('elected')
|
||||
} else if (!line.hasClass('elected') && data.elected) {
|
||||
line.addClass('elected')
|
||||
line.parent().parent().children('td').addClass('elected')
|
||||
}
|
||||
line.attr('href', data.link);
|
||||
line.text(data.text);
|
||||
},
|
||||
error: function () {
|
||||
alert("Ajax Error");
|
||||
|
@ -1,5 +1,25 @@
|
||||
td.iselected {
|
||||
background-color: green !important;
|
||||
td.elected {
|
||||
background-color: #BED4DE !important;
|
||||
}
|
||||
|
||||
td.elected a.election_link {
|
||||
background-image: url(/static/images/icons/games-highscores.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
margin-right: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
td a.election_link {
|
||||
background-image: url(/static/images/icons/games-highscores-grey.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
margin-right: 5px;
|
||||
float: left;
|
||||
}
|
Loading…
Reference in New Issue
Block a user