Fixed some (pdf) template issues and updated (DE) translation.

- Fixed #737 (Motion edit link is missing for normal delegate users)
- Fixed motion pdf filename errors (now use motion-<identifier>.pdf or if no identifier: motion-<title>.pdf with using djangos slugify for special chars in title)
- Fixed motion pdf build error if there is an unauthorized version
- Enlarge max_length of event name field to 50 chars.
- Align participant import instruction with motion import page.
- Added title field to particpants-demo_en.csv.
- participant overview: Show comma after last_name only if first_name and last_name are given.
- Changed all page titles to "<specific action page> - <event-name>" (moved event-name to the end of the string)
- Updated EN tranlation string.
- Updated DE translations.
This commit is contained in:
Emanuel Schuetze 2013-06-14 20:24:48 +02:00
parent 22cb53c66a
commit a383a4305b
47 changed files with 401 additions and 339 deletions

View File

@ -1,15 +1,15 @@
"First Name";"Last Name";"Gender";"Email";"Group id";"Structure Level";"Committee";"About me";"Comment";"Is active"
"Angramain";"Aranea";"female";;;;;;;1
"Bastian";"Bux";"male";;;;"2. Vorsitzender";;;1
"Emma";"Dampf";"female";;3;"Ortsverband Berlin-Mitte";"AG Frauen";;;0
"David";"Delegierter";"male";"david@example.com";3;"Ortsverband Berlin-Mitte";"Haushaltsausschuss";"Zu meiner Person:
"Title";"First Name";"Last Name";"Gender";"Email";"Group id";"Structure Level";"Committee";"About me";"Comment";"Is active"
;"Angramain";"Aranea";"female";;;;;;;1
;"Bastian";"Bux";"male";;;;"2. Vorsitzender";;;1
;"Emma";"Dampf";"female";;3;"Ortsverband Berlin-Mitte";"AG Frauen";;;0
PhD;"David";"Delegierter";"male";"david@example.com";3;"Ortsverband Berlin-Mitte";"Haushaltsausschuss";"Zu meiner Person:
A
B
C";"Demo-Account";1
"Marta";"Grankvist";"female";;3,4;"Ortsverband Köln";"1. Vorsitzende";;;0
"Atréju";"Grün";"male";;4;"Ortsverband Freiburg";"Versammlungsleitung";;;1
"Li Si";"Mandala";"female";;4;;;;;1
"Malin";"Melchersson";"male";;;"Gastredner e.V.";;;;1
"Molly";"Tender";"female";;3;"Ortsverband Berlin-Mitte";;;;1
"Karl";"Tur Tur";"male";;;;;;;1
"Volker";"Versammlungsleitung";"male";"volker@example.com";3,4;"Ortsverband Hamburg";"Versammlungsleitung";;"Demo-Account";1
;"Marta";"Grankvist";"female";;3,4;"Ortsverband Köln";"1. Vorsitzende";;;0
"Prof. Dr.";"Atréju";"Grün";"male";;4;"Ortsverband Freiburg";"Versammlungsleitung";;;1
;"Li Si";"Mandala";"female";;4;;;;;1
;"Malin";"Melchersson";"male";;;"Gastredner e.V.";;;;1
;"Molly";"Tender";"female";;3;"Ortsverband Berlin-Mitte";;;;1
;"Karl";"Tur Tur";"male";;;;;;;1
;"Volker";"Versammlungsleitung";"male";"volker@example.com";3,4;"Ortsverband Hamburg";"Versammlungsleitung";;"Demo-Account";1

1 Title First Name Last Name Gender Email Group id Structure Level Committee About me Comment Is active
2 Angramain Aranea female 1
3 Bastian Bux male 2. Vorsitzender 1
4 Emma Dampf female 3 Ortsverband Berlin-Mitte AG Frauen 0
5 PhD David Delegierter male david@example.com 3 Ortsverband Berlin-Mitte Haushaltsausschuss Zu meiner Person: A B C Demo-Account 1
6 Marta Grankvist female 3,4 Ortsverband Köln 1. Vorsitzende 0
7 Prof. Dr. Atréju Grün male 4 Ortsverband Freiburg Versammlungsleitung 1
8 Li Si Mandala female 4 1
9 Malin Melchersson male Gastredner e.V. 1
10 Molly Tender female 3 Ortsverband Berlin-Mitte 1
11 Karl Tur Tur male 1
12 Volker Versammlungsleitung male volker@example.com 3,4 Ortsverband Hamburg Versammlungsleitung Demo-Account 1
13
14
15

View File

@ -3,12 +3,12 @@
{% load i18n %}
{% block title %}
{{ block.super }}
{% if item %}
{{ item.title }} {% trans "Edit item" %}
{% else %}
{% trans "New item" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -4,7 +4,7 @@
{% load mptt_tags %}
{% load staticfiles %}
{% block title %}{{ block.super }} {% trans "Agenda" %}{% endblock %}
{% block title %}{% trans "Agenda" %} {{ block.super }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/agenda.css' %}" />

View File

@ -4,7 +4,7 @@
{% load tags %}
{% load staticfiles %}
{% block title %}{{ block.super }} {{ item }}{% endblock %}
{% block title %}{{ item }} {{ block.super }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/agenda.css' %}" />

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} -
{% block title %}
{% if title %} {{ title }} {% else %} {% trans "Agenda" %} {% endif %}
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} - {{ item }}{% endblock %}
{% block title %}{{ item }}{% endblock %}
{% block content %}
{% if item.text %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {{ item }}{% endblock %}
{% block title %}{{ item }}{% endblock %}
{% block header %}
<style type="text/css">

View File

@ -3,12 +3,12 @@
{% load i18n %}
{% block title %}
{{ block.super }}
{% if assignment %}
{% trans "Edit election" %}
{% else %}
{% trans "New election" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} {% trans "Elections" %}{% endblock %}
{% block title %}{% trans "Elections" %} {{ block.super }}{% endblock %}
{% block header %}
<link href="{% static 'styles/dataTables/dataTables.bootstrap.css' %}" type="text/css" rel="stylesheet">

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% load humanize %}
{% block title %}{{ block.super }} {% trans "Election" %} "{{ assignment }}" {{ ballotnumber }}. {% trans "ballot" %}{% endblock %}
{% block title %}{% trans "Election" %} "{{ assignment }}", {{ ballotnumber }}. {% trans "ballot" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>

View File

@ -5,7 +5,7 @@
{% load tags %}
{% load humanize %}
{% block title %}{{ block.super }} {% trans "Election" %} "{{ assignment }}"{% endblock %}
{% block title %}{% trans "Election" %} "{{ assignment }}" {{ block.super }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/assignment.css' %}" />

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {{ assignment }}{% endblock %}
{% block title %}{{ assignment }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/assignment.css' %}" />

View File

@ -3,6 +3,8 @@
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Configuration" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>
{% trans 'Configuration' %}

View File

@ -33,7 +33,7 @@ def setup_general_config_page(sender, **kwargs):
form_field=forms.CharField(
widget=forms.TextInput(),
label=ugettext_lazy('Event name'),
max_length=30))
max_length=50))
event_description = ConfigVariable(
name='event_description',

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {% trans 'Version' %}{% endblock %}
{% block title %}{% trans 'Version' %} {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans 'Version' %}</h1>

File diff suppressed because it is too large Load Diff

View File

@ -3,12 +3,12 @@
{% load i18n %}
{% block title %}
{{ block.super }}
{% if mediafile %}
{% trans "Edit file" %}
{% else %}
{% trans "New file" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% load tags %}
{% block title %}{{ block.super }} {% trans 'Files' %}{% endblock %}
{% block title %}{% trans 'Files' %} {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans 'Files' %}

View File

@ -97,13 +97,14 @@ def motion_to_pdf(pdf, motion):
cell4b.append(Paragraph(_(motion.state.name), stylesheet['Normal']))
motion_data.append([cell4a, cell4b])
# Version number (aid)
# Version number
if motion.versions.count() > 1:
version = motion.get_active_version()
cell5a = []
cell5b = []
cell5a.append(Paragraph("<font name='Ubuntu-Bold'>%s:</font>" % _("Version"),
stylesheet['Heading4']))
cell5b.append(Paragraph("%s" % motion.version.version_number, stylesheet['Normal']))
cell5b.append(Paragraph("%s" % version.version_number, stylesheet['Normal']))
motion_data.append([cell5a, cell5b])
# voting results

View File

@ -46,7 +46,7 @@ def setup_motion_config_page(sender, **kwargs):
name='motion_remove_supporters',
default_value=False,
form_field=forms.BooleanField(
label=ugettext_lazy('Supporters of a motion will be removed if a submitter edits his motion in early state.'),
label=ugettext_lazy('Remove all supporters of a motion if a submitter edits his motion in early state'),
required=False))
motion_preamble = ConfigVariable(
name='motion_preamble',

View File

@ -3,12 +3,12 @@
{% load i18n %}
{% block title %}
{{ block.super }}
{% if category %}
{% trans "Edit category" %}
{% else %}
{% trans "New category" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -3,7 +3,7 @@
{% load tags %}
{% load i18n %}
{% block title %}{{ block.super }} {% trans "Motions" %}{% endblock %}
{% block title %}{% trans "Motions" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>

View File

@ -5,7 +5,7 @@
{% load staticfiles %}
{% load humanize %}
{% block title %}{{ block.super }} {% trans "Motion" %} {{ motion.identifier|default:'' }}{% endblock %}
{% block title %}{% trans "Motion" %} {{ motion.identifier|default:'' }} {{ block.super }}{% endblock %}
{% block header %}
{{ block.super }}
@ -38,7 +38,7 @@
<i class="icon-facetime-video {% if motion.active %}icon-white{% endif %}"></i>
</a>
{% endif %}
{% if perms.motion.can_manage_motion or perms.agenda.can_manage_agenda %}
{% if perms.motion.can_manage_motion or perms.agenda.can_manage_agenda or allowed_actions.edit %}
<div class="btn-group">
<a data-toggle="dropdown" class="btn btn-mini dropdown-toggle">
{% trans 'More actions' %} <span class="caret"></span>

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} {% trans "Motion" %} {{ motion.identifier }}{% endblock %}
{% block title %}{% trans "Motion" %} {{ motion.identifier }} {{ block.super }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/motion.css' %}" />

View File

@ -16,12 +16,12 @@
{% endblock %}
{% block title %}
{{ block.super }}
{% if motion %}
{% trans "Edit motion" %}
{% else %}
{% trans "New motion" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {% trans 'Import motions' %} {% endblock %}
{% block title %}{% trans 'Import motions' %} {{ block.super }}{% endblock %}
{% block content %}
<h1>

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} {% trans "Motions" %}{% endblock %}
{% block title %}{% trans "Motions" %} {{ block.super }}{% endblock %}
{% block header %}
<link href="{% static 'styles/dataTables/dataTables.bootstrap.css' %}" type="text/css" rel="stylesheet">

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% block title %}
{{ block.super }} - {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}
{% trans "Motion" %} {{ motion.identifier }}, {{ poll }} {{ block.super }}
{% endblock %}
{% block content %}

View File

@ -16,6 +16,7 @@ from django.core.urlresolvers import reverse
from django.contrib import messages
from django.db import transaction
from django.db.models import Model
from django.utils.text import slugify
from django.utils.translation import ugettext as _, ugettext_lazy, ugettext_noop
from django.views.generic.detail import SingleObjectMixin
from django.http import Http404, HttpResponseRedirect
@ -672,7 +673,12 @@ class MotionPDFView(SingleObjectMixin, PDFView):
if self.print_all_motions:
return _("Motions")
else:
return _("Motion: %s") % unicode(self.object)
if self.object.identifier:
suffix = self.object.identifier
else:
suffix = self.object.title.replace(' ', '_')
suffix = slugify(suffix)
return '%s-%s' % (_("Motion"), suffix)
def append_to_pdf(self, pdf):
"""

View File

@ -3,12 +3,12 @@
{% load i18n %}
{% block title %}
{{ block.super }}
{% if edit_user %}
{% trans "Edit participant" %}
{% else %}
{% trans "New participant" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -3,7 +3,7 @@
{% load i18n %}
{% load tags %}
{% block title %}{{ block.super }} {% trans group.name %}{% endblock %}
{% block title %}{% trans group.name %} {{ block.super }}{% endblock %}
{% block content %}

View File

@ -3,12 +3,12 @@
{% load i18n %}
{% block title %}
{{ block.super }}
{% if group %}
{% trans "Edit group" %}
{% else %}
{% trans "New group" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}

View File

@ -4,7 +4,7 @@
{% load staticfiles %}
{% load tags %}
{% block title %}{{ block.super }} {% trans "Groups" %}{% endblock %}
{% block title %}{% trans "Groups" %} {{ block.super }}{% endblock %}
{% block header %}
<link href="{% static 'styles/dataTables/dataTables.bootstrap.css' %}" type="text/css" rel="stylesheet">

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {% trans "Import participants" %} {% endblock %}
{% block title %}{% trans "Import participants" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>
@ -12,7 +12,7 @@
</small>
</h1>
<p>{% trans 'Select a CSV file to import participants!' %}</p>
<p>{% trans 'Select a CSV file to import participants' %}.</p>
<p>{% trans 'Please note' %}:</p>
<ul>
@ -24,7 +24,13 @@
{% trans 'Default groups' %}:
{% trans 'Delegate' %} (<code>3</code>), {% trans 'Staff' %} (<code>4</code>)
</li>
<li>{% trans 'Required CSV file encoding: UTF-8 (Unicode).' %}</li>
<li>
{% trans 'At least first name or last name have to filled in. All other fields are optional and may be empty.' %}
</li>
<li>{% trans 'The first line (header) is ignored' %}.</li>
<li>
{% trans 'Required CSV file encoding is UTF-8' %}.
</li>
<li><a href="https://github.com/OpenSlides/OpenSlides/wiki/CSV-Import" target="_blank">{% trans 'Use the CSV example file from OpenSlides Wiki.' %}</a></li>
</ul>

View File

@ -3,6 +3,8 @@
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} {% trans "Login" %} {% endblock %}
{% block loginbutton %}
{% endblock %}

View File

@ -4,7 +4,7 @@
{% load staticfiles %}
{% load tags %}
{% block title %}{{ block.super }} {% trans "Participants" %}{% endblock %}
{% block title %}{% trans "Participants" %} {{ block.super }}{% endblock %}
{% block header %}
<link href="{% static 'styles/dataTables/dataTables.bootstrap.css' %}" type="text/css" rel="stylesheet">
@ -79,7 +79,7 @@
{% if 'participant_sort_users_by_first_name'|get_config %}
<a href="{% url 'user_view' user.id %}">{{ user.first_name }} {{ user.last_name }}</a>
{% else %}
<a href="{% url 'user_view' user.id %}">{{ user.last_name }}, {{ user.first_name }}</a>
<a href="{% url 'user_view' user.id %}">{{ user.last_name }}{% if user.last_name and user.first_name %},{% endif %} {{ user.first_name }}</a>
{% endif %}
</td>
<td class="optional">{{ user.structure_level }}</td>

View File

@ -2,10 +2,10 @@
{% load i18n %}
{% block title %}{{ block.super }} {% trans "Password Settings" %}{% endblock %}
{% block title %}{% trans "Password settings" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans "Password Settings" %}</h1>
<h1>{% trans "Password settings" %}</h1>
<form action="" method="post">{% csrf_token %}
{% include "form.html" %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {% trans "Edit profile" %}{% endblock %}
{% block title %}{% trans "Edit profile" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans "Edit profile" %}</h1>

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {{ shown_user }}{% endblock %}
{% block title %}{{ shown_user }} {{ block.super }}{% endblock %}
{% block content %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} - {{ title }}{% endblock %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<div class="item_fullscreen">{% trans group.name %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} - {{ title }}{% endblock %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<div class="item_fullscreen">{{ shown_user }}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {{ slide.title }}{% endblock %}
{% block title %}{{ slide.title }}{% endblock %}
{% block content %}
{% if slide.text %}

View File

@ -13,6 +13,8 @@
<script type="text/javascript" src="{% static 'javascript/dashboard.js' %}"></script>
{% endblock %}
{% block title %}{% trans "Dashboard" %} {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans 'Dashboard' %}
<small class="pull-right">

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{{ block.super }} {% trans 'Select widgets' %}{% endblock %}
{% block title %}{% trans 'Select widgets' %} {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans 'Select widgets' %}