Merge pull request #46 from normanjaeckel/Fixes

Some fixes for 1.3
This commit is contained in:
Oskar Hahn 2012-11-21 08:44:06 -08:00
commit bddf011f6e
7 changed files with 13 additions and 14 deletions

View File

@ -231,4 +231,4 @@ def get_widgets(request):
context={
'agenda': SLIDE['agenda'],
'items': Item.objects.all()},
permission_required='agenda.can_manage_agenda')]
permission_required='projector.can_manage_projector')]

View File

@ -293,7 +293,7 @@ class AssignmentPoll(BasePoll, CountInvalid, CountVotesCast, PublishPollMixin):
self.yesnoabstain = True
else:
# candidates <= available posts -> yes/no/abstain
if self.assignment.assignment_candidats.filter(elected=False).count() <= (self.assignment.posts):
if len(self.assignment.candidates) <= (self.assignment.posts - len(self.assignment.elected)):
self.yesnoabstain = True
else:
self.yesnoabstain = False

View File

@ -678,4 +678,4 @@ def get_widgets(request):
display_name=_('Elections'),
template='assignment/widget.html',
context={'assignments': Assignment.objects.all()},
permission_required='assignment.can_manage_assignment')]
permission_required='projector.can_manage_projector')]

View File

@ -928,4 +928,4 @@ def get_widgets(request):
display_name=_('Motions'),
template='motion/widget.html',
context={'motions': Motion.objects.all()},
permission_required='motion.can_manage_motion')]
permission_required='projector.can_manage_projector')]

View File

@ -13,11 +13,11 @@
<h2>{% trans "Groups" %}</h2>
<p>
{% for group in shown_user.groups.all %}
{{ group }},
{% empty %}
{% if shown_user.groups.all %}
{{ shown_user.groups.all|join:", " }}
{% else %}
{% trans "The participant is not member of any group." %}
{% endfor %}
{% endif %}
</p>
{% if shown_user.get_gender_display %}

View File

@ -10,11 +10,11 @@
<div id='sidebar'>
<div class='box'>
<p><strong>{% trans "Groups" %}</strong><br />
{% for group in shown_user.groups.all %}
{{ group }},
{% empty %}
{% if shown_user.groups.all %}
{{ shown_user.groups.all|join:", " }}
{% else %}
{% trans "The participant is not member of any group." %}
{% endfor %}
{% endif %}
</p>
{% if shown_user.get_gender_display %}
<p><strong>{% trans "Gender" %}</strong><br />{{ shown_user.get_gender_display }}</p>

View File

@ -13,7 +13,6 @@
from django.conf import settings
from django.conf.urls.defaults import patterns, url, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import redirect
from django.utils.importlib import import_module
@ -23,7 +22,7 @@ handler500 = 'openslides.utils.views.server_error'
urlpatterns = patterns('',
# Redirect to dashboard URL
url(r'^$', RedirectView.as_view(url=reverse_lazy('dashboard')), name='home',),
url(r'^$', RedirectView.as_view(url='dashboard'), name='home',),
(r'^agenda/', include('openslides.agenda.urls')),
(r'^motion/', include('openslides.motion.urls')),