Merge pull request #42 from emanuelschuetze/master
Several minor fixes for 1.3-beta2
This commit is contained in:
commit
b8bbec3a04
@ -6,16 +6,19 @@ How to create a new portable Windows distribution of OpenSlides:
|
|||||||
|
|
||||||
easy_install -Z django django-mptt reportlab pil
|
easy_install -Z django django-mptt reportlab pil
|
||||||
|
|
||||||
2.) Install OpenSlides by running python setup.py install in the top directory
|
2.) Install OpenSlides by running in the top directory:
|
||||||
of OpenSlides.
|
|
||||||
NOTE: This step must be repeated whenever you make changes to OpenSlides
|
|
||||||
|
|
||||||
3.) In the main directory of the OpenSlides checkout execute:
|
python setup.py install
|
||||||
|
|
||||||
python extras/win32-portable/prepare_portable.py
|
NOTE: This step must be repeated whenever you make changes to OpenSlides.
|
||||||
|
|
||||||
4.) The portable OpenSlides distribution is now ready as a zip in the
|
3.) Run in the main directory of the OpenSlides checkout:
|
||||||
'dist/' directory
|
|
||||||
|
|
||||||
Note: Creating the portable Windows distribution of OpenSlides is not possible,
|
python extras\win32-portable\prepare_portable.py
|
||||||
|
|
||||||
|
4.) The portable OpenSlides distribution is now ready as a zip archive
|
||||||
|
in the 'dist' directory
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: Creating the portable Windows distribution of OpenSlides is not possible,
|
||||||
if Python is installed in 64-bit version.
|
if Python is installed in 64-bit version.
|
||||||
|
@ -88,10 +88,6 @@ def default_config(sender, key, **kwargs):
|
|||||||
'presentation': '',
|
'presentation': '',
|
||||||
'frontpage_title': _('Welcome to OpenSlides'),
|
'frontpage_title': _('Welcome to OpenSlides'),
|
||||||
'frontpage_welcometext': _('[Place for your welcome text.]'),
|
'frontpage_welcometext': _('[Place for your welcome text.]'),
|
||||||
'show_help_text': True,
|
|
||||||
'help_text': _("Get professional support for OpenSlides on %s.") %
|
|
||||||
"<a href='http://openslides.org/' target='_blank'> \
|
|
||||||
www.openslides.org</a>",
|
|
||||||
'system_enable_anonymous': False,
|
'system_enable_anonymous': False,
|
||||||
}.get(key)
|
}.get(key)
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@
|
|||||||
<a href="{% url user_edit user.id %}">
|
<a href="{% url user_edit user.id %}">
|
||||||
<img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}">
|
<img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}">
|
||||||
</a>
|
</a>
|
||||||
|
{% if user != request_user and not user.is_superuser %}
|
||||||
<a href="{% url user_delete user.id %}">
|
<a href="{% url user_delete user.id %}">
|
||||||
<img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}">
|
<img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}">
|
||||||
</a>
|
</a>
|
||||||
@ -102,6 +103,7 @@
|
|||||||
<a class="status_link activate" href="{% url user_status_activate user.id %}" title="{% trans 'Change status to active' %}"{% if user.is_active %} style="display:none"{% endif %}>
|
<a class="status_link activate" href="{% url user_status_activate user.id %}" title="{% trans 'Change status to active' %}"{% if user.is_active %} style="display:none"{% endif %}>
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -127,12 +127,13 @@ class UserOverview(ListView):
|
|||||||
# list of all existing categories
|
# list of all existing categories
|
||||||
details = [p['detail'] for p in User.objects.values('detail')
|
details = [p['detail'] for p in User.objects.values('detail')
|
||||||
.exclude(detail='').distinct()]
|
.exclude(detail='').distinct()]
|
||||||
|
|
||||||
# list of all existing committees
|
# list of all existing committees
|
||||||
committees = [p['committee'] for p in User.objects.values('committee')
|
committees = [p['committee'] for p in User.objects.values('committee')
|
||||||
.exclude(committee='').distinct()]
|
.exclude(committee='').distinct()]
|
||||||
|
# context vars
|
||||||
context.update({
|
context.update({
|
||||||
'allusers': all_users,
|
'allusers': all_users,
|
||||||
|
'request_user': self.request.user,
|
||||||
'percent': round(percent, 1),
|
'percent': round(percent, 1),
|
||||||
'details': details,
|
'details': details,
|
||||||
'committees': committees,
|
'committees': committees,
|
||||||
@ -204,6 +205,13 @@ class UserDeleteView(DeleteView):
|
|||||||
model = User
|
model = User
|
||||||
url = 'user_overview'
|
url = 'user_overview'
|
||||||
|
|
||||||
|
def pre_redirect(self, request, *args, **kwargs):
|
||||||
|
if self.get_object() == self.request.user:
|
||||||
|
messages.error(request, _("You can not delete yourself."))
|
||||||
|
elif self.get_object().is_superuser:
|
||||||
|
messages.error(request, _("You can not delete the administrator."))
|
||||||
|
else:
|
||||||
|
super(DeleteView, self).pre_redirect(request, *args, **kwargs)
|
||||||
|
|
||||||
class SetUserStatusView(RedirectView, SingleObjectMixin):
|
class SetUserStatusView(RedirectView, SingleObjectMixin):
|
||||||
"""
|
"""
|
||||||
@ -220,6 +228,12 @@ class SetUserStatusView(RedirectView, SingleObjectMixin):
|
|||||||
if action == 'activate':
|
if action == 'activate':
|
||||||
self.object.is_active = True
|
self.object.is_active = True
|
||||||
elif action == 'deactivate':
|
elif action == 'deactivate':
|
||||||
|
if self.get_object().user == self.request.user:
|
||||||
|
messages.error(request, _("You can not deactivate yourself."))
|
||||||
|
return
|
||||||
|
elif self.get_object().is_superuser:
|
||||||
|
messages.error(request, _("You can not deactivate the administrator."))
|
||||||
|
return
|
||||||
self.object.is_active = False
|
self.object.is_active = False
|
||||||
elif action == 'toggle':
|
elif action == 'toggle':
|
||||||
self.object.is_active = not self.object.is_active
|
self.object.is_active = not self.object.is_active
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
|
|
||||||
{% block title %}{{ block.super}} – {% trans 'Projector' %} {% endblock %}
|
{% block title %}{{ block.super}} – {% trans 'Dashboard' %} {% endblock %}
|
||||||
|
|
||||||
{% block submenu %}
|
{% block submenu %}
|
||||||
{% url dashboard as url_dashboard %}
|
{% url dashboard as url_dashboard %}
|
||||||
{% url projector_select_widgets as url_select_widget %}
|
{% url projector_select_widgets as url_select_widget %}
|
||||||
<h4 class="sectiontitle">{% trans "Projector" %}</h4>
|
<h4 class="sectiontitle">{% trans "Dashboard" %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li{% if request.path == url_dashboard %} class="selected"{% endif %}>
|
<li{% if request.path == url_dashboard %} class="selected"{% endif %}>
|
||||||
<a href="{% url dashboard %}">{% trans 'Overview' %}</a>
|
<a href="{% url dashboard %}">{% trans 'Overview' %}</a>
|
||||||
|
@ -21,6 +21,7 @@ from django.core.urlresolvers import reverse
|
|||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
|
from django.shortcuts import redirect
|
||||||
from django.utils.datastructures import SortedDict
|
from django.utils.datastructures import SortedDict
|
||||||
from django.utils.importlib import import_module
|
from django.utils.importlib import import_module
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
@ -206,8 +207,7 @@ class SelectWidgetsView(TemplateView):
|
|||||||
else:
|
else:
|
||||||
transaction.commit()
|
transaction.commit()
|
||||||
self.request.session['widgets'] = activated_widgets
|
self.request.session['widgets'] = activated_widgets
|
||||||
return self.render_to_response(context)
|
return redirect(reverse('dashboard'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ProjectorEdit(RedirectView):
|
class ProjectorEdit(RedirectView):
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<small>
|
<small>
|
||||||
© Copyright 2012 | Powered by <a href="http://openslides.org" target="_blank">OpenSlides</a>
|
© Copyright 2011-2012 | Powered by <a href="http://openslides.org" target="_blank">OpenSlides</a> | Get <a href="http://openslides.org/support" target="_blank">professional support</a> for OpenSlides.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -377,8 +377,6 @@ class FrontPage(TemplateView):
|
|||||||
continue
|
continue
|
||||||
if tab.permission:
|
if tab.permission:
|
||||||
apps.append(tab)
|
apps.append(tab)
|
||||||
if config['show_help_text']:
|
|
||||||
messages.info(self.request, config['help_text'])
|
|
||||||
context.update({
|
context.update({
|
||||||
'apps': apps,
|
'apps': apps,
|
||||||
'title': config['frontpage_title'],
|
'title': config['frontpage_title'],
|
||||||
|
Loading…
Reference in New Issue
Block a user