From 09d2c3112deeeb65a49c43984909dd2d937b8f27 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Sat, 14 Apr 2012 19:14:51 +0200 Subject: [PATCH] Minor fixes. --- openslides/application/templates/application/view.html | 2 +- openslides/application/views.py | 5 ++--- openslides/assignment/views.py | 7 +++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/openslides/application/templates/application/view.html b/openslides/application/templates/application/view.html index b70601f00..ab4fec528 100644 --- a/openslides/application/templates/application/view.html +++ b/openslides/application/templates/application/view.html @@ -49,7 +49,7 @@

{% trans "Vote results" %}:

{% with application.polls as polls %} - {% if polls.exists %} + {% if not polls.exists %} {% if perms.application.can_manage_application %} {% if "genpoll" in actions %} diff --git a/openslides/application/views.py b/openslides/application/views.py index 0a6df40f9..5afcf2f95 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -391,7 +391,7 @@ def view_poll(request, poll_id): view a poll for this application. """ poll = ApplicationPoll.objects.get(pk=poll_id) - #ballot = poll.ballot + ballot = poll.ballot options = poll.get_options() if request.user.has_perm('application.can_manage_application'): if request.method == 'POST': @@ -425,7 +425,7 @@ def view_poll(request, poll_id): 'poll': poll, 'form': form, 'options': options, - #'ballot': ballot, + 'ballot': ballot, } @@ -608,7 +608,6 @@ class ApplicationPDF(PDFView): permission_required = 'application.can_manage_application' filename = u'filename=%s.pdf;' % _("Applications") top_space = 0 - document_title = '' def append_to_pdf(self, story): try: diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index bd22261d7..1f4c9f449 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -277,17 +277,16 @@ class AssignmentPollDelete(DeleteView): super(AssignmentPollDelete, self).pre_post_redirect(request, *args, **kwargs) def set_assignment(self): - self.assignment = self.object.assignment + self.assignment = self.object.assignment def get_redirect_url(self, **kwargs): - return reverse('assignment_view', args=[self.assignment.id]) - + return reverse('assignment_view', args=[self.assignment.id]) + class AssignmentPDF(PDFView): permission_required = 'assignment.can_manage_assignment' filename = u'filename=%s.pdf;' % _("Elections") top_space = 0 - document_title = None def append_to_pdf(self, story): try: