-
-
- {{ option.candidate.get_full_name() }}
- {{ option.votes[0].value | translate }}: {{ option.votes[0].weight }}
- {{ option.votes[1].value | translate }}: {{ option.votes[1].weight }}
- {{ option.votes[2].value | translate }}: {{ option.votes[2].weight }}
-
-
-
- {{ option.candidate.get_full_name() }}: {{ option.votes[0].weight}}
-
-
-
- Valid votes: {{ poll.votesvalid }}
- Invalid votes: {{ poll.votesinvalid }}
- Votes cast: {{ poll.votescast }}
+
+
+
+ Elected
+ | Candidates
+ | Votes
+ |
+
+
+ |
+ {{ option.candidate.get_full_name() }}
+ |
+
+ {{ option.votes[0].value | translate }}: {{ option.votes[0].weight }}
+ {{ option.votes[1].value | translate }}: {{ option.votes[1].weight }}
+ {{ option.votes[2].value | translate }}: {{ option.votes[2].weight }}
+
+
+ {{ option.votes[0].weight}}
+
+ |
+
+ |
+ Valid votes
+ |
+ {{ poll.votesvalid }}
+ |
+
+ |
+ Invalid votes
+ |
+ {{ poll.votesinvalid }}
+ |
+
+ |
+ Votes cast
+ |
+ {{ poll.votescast }}
+ |
diff --git a/openslides/assignments/views.py b/openslides/assignments/views.py
index fac971a3c..44f6eab89 100644
--- a/openslides/assignments/views.py
+++ b/openslides/assignments/views.py
@@ -146,8 +146,6 @@ class AssignmentViewSet(ModelViewSet):
"""
user = self.get_user_from_request_data(request)
assignment = self.get_object()
- if assignment.is_elected(user):
- raise ValidationError({'detail': _('User %s is already elected.') % user})
if request.method == 'POST':
message = self.nominate_other(request, user, assignment)
else:
@@ -156,15 +154,14 @@ class AssignmentViewSet(ModelViewSet):
return Response({'detail': message})
def nominate_other(self, request, user, assignment):
+ if assignment.is_elected(user):
+ raise ValidationError({'detail': _('User %s is already elected.') % user})
if assignment.phase == assignment.PHASE_FINISHED:
detail = _('You can not nominate someone to this election because it is finished.')
raise ValidationError({'detail': detail})
if assignment.phase == assignment.PHASE_VOTING and not request.user.has_perm('assignments.can_manage'):
# To nominate another user during voting you have to be a manager.
self.permission_denied(request)
- if not request.user.has_perm('assignments.can_manage'):
- if assignment.is_elected(user):
- raise ValidationError({'detail': _('User %s is already elected.') % user})
if assignment.is_candidate(user):
raise ValidationError({'detail': _('User %s is already nominated.') % user})
assignment.set_candidate(user)
@@ -177,7 +174,7 @@ class AssignmentViewSet(ModelViewSet):
if assignment.phase == assignment.PHASE_FINISHED:
detail = _('You can not delete someones candidature to this election because it is finished.')
raise ValidationError({'detail': detail})
- if not assignment.is_candidate(user):
+ if not assignment.is_candidate(user) and not assignment.is_elected(user):
raise ValidationError({'detail': _('User %s has no status in this election.') % user})
assignment.delete_related_user(user)
return _('Candidate %s was withdrawn successfully.') % user
diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css
index 185f3c9dd..d625c0641 100644
--- a/openslides/core/static/css/app.css
+++ b/openslides/core/static/css/app.css
@@ -659,6 +659,9 @@ img {
.result_label {
margin-top: 5px;
}
+tr.total td {
+ font-weight: bold;
+}
/* Chatbox */
#chatbox {
@@ -685,6 +688,10 @@ img {
width: 1px;
}
+.minimumTable {
+ width: auto;
+}
+
.deleteColumn {
text-align: center;
background-color: #ff9999 !important;