From 350a60722c5fb6678d81fc10842426d2e0a495b9 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Fri, 5 Aug 2016 09:37:39 +0200 Subject: [PATCH] repairs ballots for candidates with structure_level --- openslides/assignments/views.py | 49 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/openslides/assignments/views.py b/openslides/assignments/views.py index 5fa6d1472..d7ca68ef6 100644 --- a/openslides/assignments/views.py +++ b/openslides/assignments/views.py @@ -497,32 +497,31 @@ class AssignmentPollPDF(PDFView): cell.append(Paragraph( "(%s)" % candidate.structure_level, stylesheet['Ballot_option_suffix_YNA'])) + if self.poll.yesnoabstain: + cell.append(Paragraph( + " ", stylesheet['Ballot_option_suffix_YNA'])) + cell.append(Paragraph("%(circle)s \ + %(yes)s     \ + %(circle)s \ + %(no)s     \ + %(circle)s \ + %(abstain)s" % + {'circle': circle, + 'yes': _("Yes"), + 'no': _("No"), + 'abstain': _("Abstain")}, + stylesheet['Ballot_option_circle_YNA'])) else: - if self.poll.yesnoabstain: - cell.append(Paragraph( - " ", stylesheet['Ballot_option_suffix_YNA'])) - cell.append(Paragraph("%(circle)s \ - %(yes)s     \ - %(circle)s \ - %(no)s     \ - %(circle)s \ - %(abstain)s" % - {'circle': circle, - 'yes': _("Yes"), - 'no': _("No"), - 'abstain': _("Abstain")}, - stylesheet['Ballot_option_circle_YNA'])) - else: - cell.append(Paragraph( - " ", stylesheet['Ballot_option_suffix_YNA'])) - cell.append(Paragraph("%(circle)s \ - %(yes)s     \ - %(circle)s \ - %(no)s    " % - {'circle': circle, - 'yes': _("Yes"), - 'no': _("No")}, - stylesheet['Ballot_option_circle_YNA'])) + cell.append(Paragraph( + " ", stylesheet['Ballot_option_suffix_YNA'])) + cell.append(Paragraph("%(circle)s \ + %(yes)s     \ + %(circle)s \ + %(no)s    " % + {'circle': circle, + 'yes': _("Yes"), + 'no': _("No")}, + stylesheet['Ballot_option_circle_YNA'])) if counter == 13: cellcolumnA = cell cell = []