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
|
||||
|
||||
2.) Install OpenSlides by running python setup.py install in the top directory
|
||||
of OpenSlides.
|
||||
NOTE: This step must be repeated whenever you make changes to OpenSlides
|
||||
2.) Install OpenSlides by running in the top directory:
|
||||
|
||||
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
|
||||
'dist/' directory
|
||||
3.) Run in the main directory of the OpenSlides checkout:
|
||||
|
||||
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.
|
||||
|
@ -88,10 +88,6 @@ def default_config(sender, key, **kwargs):
|
||||
'presentation': '',
|
||||
'frontpage_title': _('Welcome to OpenSlides'),
|
||||
'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,
|
||||
}.get(key)
|
||||
|
||||
|
@ -93,6 +93,7 @@
|
||||
<a href="{% url user_edit user.id %}">
|
||||
<img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}">
|
||||
</a>
|
||||
{% if user != request_user and not user.is_superuser %}
|
||||
<a href="{% url user_delete user.id %}">
|
||||
<img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}">
|
||||
</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 %}>
|
||||
<span></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
@ -127,12 +127,13 @@ class UserOverview(ListView):
|
||||
# list of all existing categories
|
||||
details = [p['detail'] for p in User.objects.values('detail')
|
||||
.exclude(detail='').distinct()]
|
||||
|
||||
# list of all existing committees
|
||||
committees = [p['committee'] for p in User.objects.values('committee')
|
||||
.exclude(committee='').distinct()]
|
||||
# context vars
|
||||
context.update({
|
||||
'allusers': all_users,
|
||||
'request_user': self.request.user,
|
||||
'percent': round(percent, 1),
|
||||
'details': details,
|
||||
'committees': committees,
|
||||
@ -204,6 +205,13 @@ class UserDeleteView(DeleteView):
|
||||
model = User
|
||||
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):
|
||||
"""
|
||||
@ -220,6 +228,12 @@ class SetUserStatusView(RedirectView, SingleObjectMixin):
|
||||
if action == 'activate':
|
||||
self.object.is_active = True
|
||||
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
|
||||
elif action == 'toggle':
|
||||
self.object.is_active = not self.object.is_active
|
||||
|
@ -4,12 +4,12 @@
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}{{ block.super}} – {% trans 'Projector' %} {% endblock %}
|
||||
{% block title %}{{ block.super}} – {% trans 'Dashboard' %} {% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
{% url dashboard as url_dashboard %}
|
||||
{% url projector_select_widgets as url_select_widget %}
|
||||
<h4 class="sectiontitle">{% trans "Projector" %}</h4>
|
||||
<h4 class="sectiontitle">{% trans "Dashboard" %}</h4>
|
||||
<ul>
|
||||
<li{% if request.path == url_dashboard %} class="selected"{% endif %}>
|
||||
<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.models import Q
|
||||
from django.dispatch import receiver
|
||||
from django.shortcuts import redirect
|
||||
from django.utils.datastructures import SortedDict
|
||||
from django.utils.importlib import import_module
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
@ -206,8 +207,7 @@ class SelectWidgetsView(TemplateView):
|
||||
else:
|
||||
transaction.commit()
|
||||
self.request.session['widgets'] = activated_widgets
|
||||
return self.render_to_response(context)
|
||||
|
||||
return redirect(reverse('dashboard'))
|
||||
|
||||
|
||||
class ProjectorEdit(RedirectView):
|
||||
|
@ -76,7 +76,7 @@
|
||||
{% endblock %}
|
||||
<div id="footer">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -377,8 +377,6 @@ class FrontPage(TemplateView):
|
||||
continue
|
||||
if tab.permission:
|
||||
apps.append(tab)
|
||||
if config['show_help_text']:
|
||||
messages.info(self.request, config['help_text'])
|
||||
context.update({
|
||||
'apps': apps,
|
||||
'title': config['frontpage_title'],
|
||||
|
Loading…
Reference in New Issue
Block a user