Rename participant field 'details' to 'structure level' (Gliederungsebene). (DB rebuild required!)
This commit is contained in:
parent
844b2892f1
commit
0fbb7dced3
Binary file not shown.
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: OpenSlides 1.x\n"
|
"Project-Id-Version: OpenSlides 1.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2012-11-19 23:01+0100\n"
|
"POT-Creation-Date: 2012-11-19 23:20+0100\n"
|
||||||
"PO-Revision-Date: 2012-07-28 11:07+0200\n"
|
"PO-Revision-Date: 2012-07-28 11:07+0200\n"
|
||||||
"Last-Translator: Emanuel Schuetze <emanuel@intevation.de>\n"
|
"Last-Translator: Emanuel Schuetze <emanuel@intevation.de>\n"
|
||||||
"Language-Team: support@openslides.de\n"
|
"Language-Team: support@openslides.de\n"
|
||||||
@ -1762,8 +1762,8 @@ msgstr "Gast"
|
|||||||
|
|
||||||
#: participant/models.py:44 participant/templates/participant/overview.html:30
|
#: participant/models.py:44 participant/templates/participant/overview.html:30
|
||||||
#: participant/templates/participant/overview.html:68
|
#: participant/templates/participant/overview.html:68
|
||||||
msgid "Detail"
|
msgid "Structure level"
|
||||||
msgstr "Detail"
|
msgstr "Gliederungsebene"
|
||||||
|
|
||||||
#: participant/models.py:45
|
#: participant/models.py:45
|
||||||
msgid "Will be shown after the name."
|
msgid "Will be shown after the name."
|
||||||
@ -2296,8 +2296,8 @@ msgid ""
|
|||||||
"Get <a href='http://openslides.org/support' target='_blank'>professional "
|
"Get <a href='http://openslides.org/support' target='_blank'>professional "
|
||||||
"support</a> for OpenSlides."
|
"support</a> for OpenSlides."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Nutzen Sie unseren <a href='http://openslides.org/support' target='_blank'>professionellen "
|
"Nutzen Sie unseren <a href='http://openslides.org/support' "
|
||||||
"Support</a> für OpenSlides."
|
"target='_blank'>professionellen Support</a> für OpenSlides."
|
||||||
|
|
||||||
#: utils/pdf.py:227
|
#: utils/pdf.py:227
|
||||||
#, python-format
|
#, python-format
|
||||||
|
@ -615,7 +615,7 @@ def motion_import(request):
|
|||||||
user.last_name = last_name
|
user.last_name = last_name
|
||||||
user.first_name = first_name
|
user.first_name = first_name
|
||||||
user.username = gen_username(first_name, last_name)
|
user.username = gen_username(first_name, last_name)
|
||||||
user.detail = ''
|
user.structure_level = ''
|
||||||
user.committee = ''
|
user.committee = ''
|
||||||
user.gender = ''
|
user.gender = ''
|
||||||
user.type = ''
|
user.type = ''
|
||||||
|
@ -71,7 +71,7 @@ def import_users(csv_file):
|
|||||||
dialect=dialect)):
|
dialect=dialect)):
|
||||||
if line_no:
|
if line_no:
|
||||||
try:
|
try:
|
||||||
(first_name, last_name, gender, detail, type, committee, comment) = line[:7]
|
(first_name, last_name, gender, structure_level, type, committee, comment) = line[:7]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
error_messages.append(_('Ignoring malformed line %d in import file.') % line_no + 1)
|
error_messages.append(_('Ignoring malformed line %d in import file.') % line_no + 1)
|
||||||
continue
|
continue
|
||||||
@ -80,7 +80,7 @@ def import_users(csv_file):
|
|||||||
user.first_name = first_name
|
user.first_name = first_name
|
||||||
user.username = gen_username(first_name, last_name)
|
user.username = gen_username(first_name, last_name)
|
||||||
user.gender = gender
|
user.gender = gender
|
||||||
user.detail = detail
|
user.structure_level = structure_level
|
||||||
user.type = type
|
user.type = type
|
||||||
user.committee = committee
|
user.committee = committee
|
||||||
user.comment = comment
|
user.comment = comment
|
||||||
|
@ -27,7 +27,7 @@ class UserCreateForm(forms.ModelForm, CssClassMixin):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = User
|
||||||
fields = ('first_name', 'last_name', 'is_active', 'groups', 'detail',
|
fields = ('first_name', 'last_name', 'is_active', 'groups', 'structure_level',
|
||||||
'gender', 'type', 'committee', 'about_me', 'comment', 'default_password')
|
'gender', 'type', 'committee', 'about_me', 'comment', 'default_password')
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class UserUpdateForm(UserCreateForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = User
|
||||||
fields = ('username', 'first_name', 'last_name', 'is_active', 'groups',
|
fields = ('username', 'first_name', 'last_name', 'is_active', 'groups',
|
||||||
'detail', 'gender', 'type', 'committee', 'about_me', 'comment',
|
'structure_level', 'gender', 'type', 'committee', 'about_me', 'comment',
|
||||||
'default_password')
|
'default_password')
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@ class User(DjangoUser, PersonMixin, Person, SlideMixin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
django_user = models.OneToOneField(DjangoUser, editable=False, parent_link=True)
|
django_user = models.OneToOneField(DjangoUser, editable=False, parent_link=True)
|
||||||
detail = models.CharField(
|
structure_level = models.CharField(
|
||||||
max_length=100, blank=True, default='', verbose_name=_("Detail"),
|
max_length=100, blank=True, default='', verbose_name=_("Structure level"),
|
||||||
help_text=_('Will be shown after the name.'))
|
help_text=_('Will be shown after the name.'))
|
||||||
gender = models.CharField(
|
gender = models.CharField(
|
||||||
max_length=50, choices=GENDER_CHOICES, blank=True,
|
max_length=50, choices=GENDER_CHOICES, blank=True,
|
||||||
@ -67,10 +67,10 @@ class User(DjangoUser, PersonMixin, Person, SlideMixin):
|
|||||||
return self.get_full_name() or self.username
|
return self.get_full_name() or self.username
|
||||||
|
|
||||||
def get_name_suffix(self):
|
def get_name_suffix(self):
|
||||||
return self.detail
|
return self.structure_level
|
||||||
|
|
||||||
def set_name_suffix(self, value):
|
def set_name_suffix(self, value):
|
||||||
self.detail = value
|
self.structure_level = value
|
||||||
|
|
||||||
name_suffix = property(get_name_suffix, set_name_suffix)
|
name_suffix = property(get_name_suffix, set_name_suffix)
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@
|
|||||||
<option value="female"{% if 'female' in sortfilter.gender %} selected{% endif %}>{% trans "Female" %}</option>
|
<option value="female"{% if 'female' in sortfilter.gender %} selected{% endif %}>{% trans "Female" %}</option>
|
||||||
<option value=""{% if '' in sortfilter.gender %} selected{% endif %}>{% trans "Not specified" %}</option>
|
<option value=""{% if '' in sortfilter.gender %} selected{% endif %}>{% trans "Not specified" %}</option>
|
||||||
</select>
|
</select>
|
||||||
<select class="default-input" name="detail" onchange="document.forms['filter'].submit()">
|
<select class="default-input" name="structure_level" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {% trans "Detail" %} --</option>
|
<option value="---">-- {% trans "Structure level" %} --</option>
|
||||||
{% for detail in details %}
|
{% for level in structure_levels %}
|
||||||
<option value="{{ detail }}"{% if detail in sortfilter.detail %} selected{% endif %}>
|
<option value="{{ level }}"{% if level in sortfilter.structure_level %} selected{% endif %}>
|
||||||
{{ detail }}</option>
|
{{ level }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<select class="default-input" name="type" onchange="document.forms['filter'].submit()">
|
<select class="default-input" name="type" onchange="document.forms['filter'].submit()">
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><a href="?sort=first_name&reverse={% if 'first_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "First Name" %}</a></th>
|
<th><a href="?sort=first_name&reverse={% if 'first_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "First Name" %}</a></th>
|
||||||
<th><a href="?sort=last_name&reverse={% if 'last_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Name" %}</a></th>
|
<th><a href="?sort=last_name&reverse={% if 'last_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Name" %}</a></th>
|
||||||
<th><a href="?sort=detail&reverse={% if 'detail' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Detail" %}</a></th>
|
<th><a href="?sort=structure_level&reverse={% if 'structure_level' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Structure level" %}</a></th>
|
||||||
<th><a href="?sort=type&reverse={% if 'type' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Type" %}</a></th>
|
<th><a href="?sort=type&reverse={% if 'type' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Type" %}</a></th>
|
||||||
<th><a href="?sort=committee&reverse={% if 'committee' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Committee" %}</a></th>
|
<th><a href="?sort=committee&reverse={% if 'committee' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Committee" %}</a></th>
|
||||||
{% if perms.participant.can_manage_participant %}
|
{% if perms.participant.can_manage_participant %}
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<tr class="{% cycle '' 'odd' %}">
|
<tr class="{% cycle '' 'odd' %}">
|
||||||
<td><a href="{% model_url user 'view' %}">{{ user.first_name }}</a></td>
|
<td><a href="{% model_url user 'view' %}">{{ user.first_name }}</a></td>
|
||||||
<td><a href="{% model_url user 'view' %}">{{ user.last_name }}</a></td>
|
<td><a href="{% model_url user 'view' %}">{{ user.last_name }}</a></td>
|
||||||
<td>{{ user.detail }}</td>
|
<td>{{ user.structure_level }}</td>
|
||||||
<td>{{ user.get_type_display }}</td>
|
<td>{{ user.get_type_display }}</td>
|
||||||
<td>{{ user.committee }}</td>
|
<td>{{ user.committee }}</td>
|
||||||
{% if perms.participant.can_manage_participant %}
|
{% if perms.participant.can_manage_participant %}
|
||||||
|
@ -38,7 +38,7 @@ class UserTest(TestCase):
|
|||||||
self.assertEqual(unicode(self.user1), 'Max Mustermann')
|
self.assertEqual(unicode(self.user1), 'Max Mustermann')
|
||||||
|
|
||||||
def test_name_suffix(self):
|
def test_name_suffix(self):
|
||||||
self.user1.detail = 'München'
|
self.user1.structure_level = 'München'
|
||||||
self.user1.save()
|
self.user1.save()
|
||||||
self.assertEqual(unicode(self.user1), 'Max Mustermann (München)')
|
self.assertEqual(unicode(self.user1), 'Max Mustermann (München)')
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class UserOverview(ListView):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
sortfilter = {}
|
sortfilter = {}
|
||||||
|
|
||||||
for value in ['gender', 'detail', 'type', 'committee', 'status',
|
for value in ['gender', 'structure_level', 'type', 'committee', 'status',
|
||||||
'sort', 'reverse']:
|
'sort', 'reverse']:
|
||||||
if value in self.request.REQUEST:
|
if value in self.request.REQUEST:
|
||||||
if self.request.REQUEST[value] == '---':
|
if self.request.REQUEST[value] == '---':
|
||||||
@ -85,8 +85,8 @@ class UserOverview(ListView):
|
|||||||
query = User.objects
|
query = User.objects
|
||||||
if 'gender' in sortfilter:
|
if 'gender' in sortfilter:
|
||||||
query = query.filter(gender__iexact=sortfilter['gender'][0])
|
query = query.filter(gender__iexact=sortfilter['gender'][0])
|
||||||
if 'detail' in sortfilter:
|
if 'structure_level' in sortfilter:
|
||||||
query = query.filter(detail__iexact=sortfilter['detail'][0])
|
query = query.filter(structure_level__iexact=sortfilter['structure_level'][0])
|
||||||
if 'type' in sortfilter:
|
if 'type' in sortfilter:
|
||||||
query = query.filter(type__iexact=sortfilter['type'][0])
|
query = query.filter(type__iexact=sortfilter['type'][0])
|
||||||
if 'committee' in sortfilter:
|
if 'committee' in sortfilter:
|
||||||
@ -97,7 +97,7 @@ class UserOverview(ListView):
|
|||||||
if sortfilter['sort'][0] in ['first_name', 'last_name', 'last_login']:
|
if sortfilter['sort'][0] in ['first_name', 'last_name', 'last_login']:
|
||||||
query = query.order_by(sortfilter['sort'][0])
|
query = query.order_by(sortfilter['sort'][0])
|
||||||
elif (sortfilter['sort'][0] in
|
elif (sortfilter['sort'][0] in
|
||||||
['detail', 'type', 'committee', 'comment']):
|
['structure_level', 'type', 'committee', 'comment']):
|
||||||
query = query.order_by(
|
query = query.order_by(
|
||||||
'%s' % sortfilter['sort'][0])
|
'%s' % sortfilter['sort'][0])
|
||||||
else:
|
else:
|
||||||
@ -125,8 +125,8 @@ class UserOverview(ListView):
|
|||||||
percent = 0
|
percent = 0
|
||||||
|
|
||||||
# list of all existing categories
|
# list of all existing categories
|
||||||
details = [p['detail'] for p in User.objects.values('detail')
|
structure_levels = [p['structure_level'] for p in User.objects.values('structure_level')
|
||||||
.exclude(detail='').distinct()]
|
.exclude(structure_level='').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()]
|
||||||
@ -135,7 +135,7 @@ class UserOverview(ListView):
|
|||||||
'allusers': all_users,
|
'allusers': all_users,
|
||||||
'request_user': self.request.user,
|
'request_user': self.request.user,
|
||||||
'percent': round(percent, 1),
|
'percent': round(percent, 1),
|
||||||
'details': details,
|
'structure_levels': structure_levels,
|
||||||
'committees': committees,
|
'committees': committees,
|
||||||
'cookie': ['participant_sortfilter', urlencode(decodedict(self.sortfilter),
|
'cookie': ['participant_sortfilter', urlencode(decodedict(self.sortfilter),
|
||||||
doseq=True)],
|
doseq=True)],
|
||||||
@ -268,7 +268,7 @@ class ParticipantsListPDF(PDFView):
|
|||||||
counter,
|
counter,
|
||||||
Paragraph(user.last_name, stylesheet['Tablecell']),
|
Paragraph(user.last_name, stylesheet['Tablecell']),
|
||||||
Paragraph(user.first_name, stylesheet['Tablecell']),
|
Paragraph(user.first_name, stylesheet['Tablecell']),
|
||||||
Paragraph(user.detail, stylesheet['Tablecell']),
|
Paragraph(user.structure_level, stylesheet['Tablecell']),
|
||||||
Paragraph(user.get_type_display(), stylesheet['Tablecell']),
|
Paragraph(user.get_type_display(), stylesheet['Tablecell']),
|
||||||
Paragraph(user.committee, stylesheet['Tablecell'])])
|
Paragraph(user.committee, stylesheet['Tablecell'])])
|
||||||
t = LongTable(data, style=[
|
t = LongTable(data, style=[
|
||||||
|
Loading…
Reference in New Issue
Block a user