diff --git a/openslides/agenda/templates/beamer.html b/openslides/agenda/templates/beamer.html
index e1c64cc9d..d9dbacb96 100644
--- a/openslides/agenda/templates/beamer.html
+++ b/openslides/agenda/templates/beamer.html
@@ -5,9 +5,12 @@
{% load tags %}
diff --git a/openslides/agenda/templates/beamer/ItemAssignment.html b/openslides/agenda/templates/beamer/ItemAssignment.html
index 98157b4c7..78c05ed42 100644
--- a/openslides/agenda/templates/beamer/ItemAssignment.html
+++ b/openslides/agenda/templates/beamer/ItemAssignment.html
@@ -1,19 +1,24 @@
{% extends "beamer.html" %}
-{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
+{% block title %}{{ block.super }} - #{{ item.title }}{% endblock %}
+{% block header %}
+
+
+{% endblock %}
{% block content %}
{% trans "Election" %}:
{{ item.assignment }}
- {% if item.assignment.status == "sea" or item.assignment.status == "vot" %}
+
+ {% if item.assignment.status == "sea" or item.assignment.status == "vot" %}
+ {% trans "Number of available posts" %}:
+ {{ item.assignment.posts }}
{% endif %}
+
+
- {% for v in vote %}
- {% if v %}
+ |
+ {% with vote|first as candidate %}
+ {% if candidate.1 %}
+
+ {% endif %}
+ {{ candidate.0 }}
+ {% endwith %}
+ |
+ {% for v in vote|last %}
+ {% if v %}
{% if v|length == 3 %}
{% if v.0 %}{{ v.0 }}{% else %}∅{% endif %}
{% if v.1 %}{{ v.1 }}{% else %}∅{% endif %}
{% if v.2 %}{{ v.2 }}{% else %}∅{% endif %}
{% else %}
+ {% if v != "-" %}{% endif %}
{{ v }}
{% endif %}
{% else %}∅{% endif %}
diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py
index 57257f1c6..96696eff7 100644
--- a/openslides/agenda/views.py
+++ b/openslides/agenda/views.py
@@ -106,26 +106,21 @@ def beamer_edit(request, direction):
def assignment_votes(item):
votes = []
if item.type == "ItemAssignment":
- assignment = item.cast().assignment
- # list of candidates
- candidates = set()
- for option in Option.objects.filter(poll__assignment=assignment):
- candidates.add(option.value)
- # list of votes
- votes = []
- for candidate in candidates:
- tmplist = []
- tmplist.append(candidate)
- for poll in assignment.poll_set.all():
- if candidate in poll.options_values:
- option = Option.objects.filter(poll=poll).filter(user=candidate)[0]
- if poll.optiondecision:
- tmplist.append([option.yes, option.no, option.undesided])
- else:
- tmplist.append(option.yes)
- else:
- tmplist.append("-")
- votes.append(tmplist)
+ assignment = item.cast().assignment
+ # list of votes
+ votes = []
+ for candidate in assignment.candidates:
+ tmplist = [[candidate, assignment.is_elected(candidate)], []]
+ for poll in assignment.poll_set.all():
+ if candidate in poll.options_values:
+ option = Option.objects.filter(poll=poll).filter(user=candidate)[0]
+ if poll.optiondecision:
+ tmplist[1].append([option.yes, option.no, option.undesided])
+ else:
+ tmplist[1].append(option.yes)
+ else:
+ tmplist[1].append("-")
+ votes.append(tmplist)
return votes
diff --git a/openslides/application/templates/application/view.html b/openslides/application/templates/application/view.html
index 879636c65..c13a94136 100644
--- a/openslides/application/templates/application/view.html
+++ b/openslides/application/templates/application/view.html
@@ -13,8 +13,8 @@
{% endif %}
-
- {{ application.submitter }}
+
+ {{ application.submitter.profile }}
{% if user == application.submitter %}
{% endif %}
@@ -24,10 +24,11 @@
{% if application.supporter.count == 0 %}
-
{% else %}
+
{% for supporter in application.supporter.all %}
- {{ forloop.counter }}. {{supporter }}
- {% if not forloop.last %} {% endif %}
+ - {{ supporter.profile }}
{% endfor %}
+
{% endif %}
{% endif %}
diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py
index b400f3d78..3e42d6a2a 100644
--- a/openslides/assignment/models.py
+++ b/openslides/assignment/models.py
@@ -71,9 +71,10 @@ class Assignment(models.Model):
def candidates(self):
# list of candidates
from poll.models import Option
- candidates = set()
- for option in Option.objects.filter(poll__assignment=self):
- candidates.add(option.value)
+ candidates = []
+ #for option in Option.objects.values('user__user__profile').filter(poll__assignment=self).order_by('user__user__first_name').distinct():
+ for option in Option.objects.filter(poll__assignment=self).order_by('user__user__first_name'):
+ candidates.append(option.value)
return candidates
def set_elected(self, profile, value=True):
diff --git a/openslides/assignment/templates/assignment/view.html b/openslides/assignment/templates/assignment/view.html
index d30a23051..c1dc8cd34 100644
--- a/openslides/assignment/templates/assignment/view.html
+++ b/openslides/assignment/templates/assignment/view.html
@@ -145,12 +145,18 @@
|