diff --git a/openslides/agenda/templates/beamer/ItemAssignment.html b/openslides/agenda/templates/beamer/ItemAssignment.html index 78c05ed42..0ec9fde26 100644 --- a/openslides/agenda/templates/beamer/ItemAssignment.html +++ b/openslides/agenda/templates/beamer/ItemAssignment.html @@ -5,17 +5,15 @@ {% endblock %} {% block content %} - {% trans "Election" %}: -

{{ item.assignment }}

- +

{% trans "Election" %}: {{ item.assignment }}

@@ -70,12 +68,24 @@ {% else %}∅{% endif %} {% endfor %} - + {% empty %} {% trans "No ballots available." %} {% endfor %} + + {%trans 'Invalid votes' %} + {% for p in polls %} + {{ p.votesinvalid }} + {% endfor %} + + + {%trans 'Votes cast' %} + {% for p in polls %} + {{ p.votescast }} + {% endfor %} + {% endif %} diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py index 96696eff7..f26610350 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -37,12 +37,13 @@ def view(request, item_id): """ item = Item.objects.get(id=item_id) votes = assignment_votes(item) - + polls = assignment_polls(item) return render_to_response('beamer/%s.html' % item.type, { 'item': item.cast(), 'ajax': 'off', 'votes': votes, + 'polls': polls, }, context_instance=RequestContext(request)) @@ -57,6 +58,7 @@ def beamer(request): try: item = get_active_item() votes = assignment_votes(item) + polls = assignment_polls(item) if is_summary(): items = item.children.filter(hidden=False) data['items'] = items @@ -66,6 +68,7 @@ def beamer(request): data['item'] = item.cast() data['title'] = item.title data['votes'] = votes + data['polls'] = polls template = 'beamer/%s.html' % (item.type) except Item.DoesNotExist: items = Item.objects.filter(parent=None).filter(hidden=False) \ @@ -124,6 +127,14 @@ def assignment_votes(item): return votes +def assignment_polls(item): + polls = [] + if item.type == "ItemAssignment": + for poll in item.cast().assignment.poll_set.filter(assignment=item.cast().assignment): + polls.append(poll) + return polls + + @permission_required('agenda.can_see_agenda') @template('agenda/overview.html') def overview(request): diff --git a/openslides/static/styles/beamer.css b/openslides/static/styles/beamer.css index b9e585d7e..22da8348d 100644 --- a/openslides/static/styles/beamer.css +++ b/openslides/static/styles/beamer.css @@ -149,3 +149,8 @@ table td { padding: 10px 10px; vertical-align:middle; } +tr.total td { + border-top: 1px solid #333333; + background-color: #e3e3e3; +} +