Fixed #390: Added new user field 'about me'

This commit is contained in:
Emanuel Schuetze 2012-11-03 09:34:42 +01:00
parent 005cb2f15e
commit a363efe2ef
5 changed files with 32 additions and 15 deletions

View File

@ -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-03 08:56+0100\n" "POT-Creation-Date: 2012-11-03 09:32+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"
@ -41,9 +41,9 @@ msgid "Text"
msgstr "Text" msgstr "Text"
#: agenda/models.py:44 agenda/templates/agenda/overview.html:65 #: agenda/models.py:44 agenda/templates/agenda/overview.html:65
#: agenda/templates/agenda/view.html:13 participant/models.py:53 #: agenda/templates/agenda/view.html:13 participant/models.py:56
#: participant/templates/participant/overview.html:72 #: participant/templates/participant/overview.html:72
#: participant/templates/participant/user_detail.html:40 #: participant/templates/participant/user_detail.html:45
msgid "Comment" msgid "Comment"
msgstr "Kommentar" msgstr "Kommentar"
@ -392,7 +392,7 @@ msgstr "Abgeschlossen"
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#: assignment/models.py:55 participant/models.py:117 #: assignment/models.py:55 participant/models.py:120
msgid "Description" msgid "Description"
msgstr "Beschreibung" msgstr "Beschreibung"
@ -1789,31 +1789,40 @@ msgstr "Typ"
msgid "Committee" msgid "Committee"
msgstr "Amt" msgstr "Amt"
#: participant/models.py:53
#: participant/templates/participant/user_detail.html:39
msgid "About me"
msgstr "Über mich"
#: participant/models.py:54 #: participant/models.py:54
msgid "Your profile text"
msgstr "Ihr Profiltext"
#: participant/models.py:57
msgid "Only for notes." msgid "Only for notes."
msgstr "Nur für Notizen." msgstr "Nur für Notizen."
#: participant/models.py:57 #: participant/models.py:60
msgid "Default password" msgid "Default password"
msgstr "Vorgegebenes Passwort" msgstr "Vorgegebenes Passwort"
#: participant/models.py:105 #: participant/models.py:108
msgid "Can see participant" msgid "Can see participant"
msgstr "Darf die Teilnehmer/inen sehen" msgstr "Darf die Teilnehmer/inen sehen"
#: participant/models.py:107 #: participant/models.py:110
msgid "Can manage participant" msgid "Can manage participant"
msgstr "Darf die Teilnehmer/inen verwalten" msgstr "Darf die Teilnehmer/inen verwalten"
#: participant/models.py:116 #: participant/models.py:119
msgid "Use this user group as participant" msgid "Use this user group as participant"
msgstr "Verwende diese Benutzerrolle als Teilnehmer/in" msgstr "Verwende diese Benutzerrolle als Teilnehmer/in"
#: participant/models.py:116 #: participant/models.py:119
msgid "For example as submitter of a motion." msgid "For example as submitter of a motion."
msgstr "Zum Beispiel als Antragsteller." msgstr "Zum Beispiel als Antragsteller."
#: participant/models.py:198 #: participant/models.py:201
msgid "Welcome to OpenSlides!" msgid "Welcome to OpenSlides!"
msgstr "Willkommen bei OpenSlides!" msgstr "Willkommen bei OpenSlides!"
@ -2079,7 +2088,7 @@ msgid "of"
msgstr "von" msgstr "von"
#: participant/templates/participant/overview.html:73 #: participant/templates/participant/overview.html:73
#: participant/templates/participant/user_detail.html:44 #: participant/templates/participant/user_detail.html:49
msgid "Last Login" msgid "Last Login"
msgstr "Letzer Login" msgstr "Letzer Login"
@ -2137,7 +2146,7 @@ msgstr "Ich bin Kandidat/in bei folgenden Wahlen:"
msgid "The participant is not member of any group." msgid "The participant is not member of any group."
msgstr "Teilnehmer/in ist kein Mitglieder einer Gruppe." msgstr "Teilnehmer/in ist kein Mitglieder einer Gruppe."
#: participant/templates/participant/user_detail.html:48 #: participant/templates/participant/user_detail.html:53
msgid "The participant has not logged in yet." msgid "The participant has not logged in yet."
msgstr "Teilnehmer/in hat sich noch nicht angemeldet." msgstr "Teilnehmer/in hat sich noch nicht angemeldet."

View File

@ -28,14 +28,14 @@ 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', 'detail',
'gender', 'type', 'committee', 'comment', 'default_password') 'gender', 'type', 'committee', 'about_me', 'comment', 'default_password')
class UserUpdateForm(UserCreateForm): 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', 'comment', 'detail', 'gender', 'type', 'committee', 'about_me', 'comment',
'default_password') 'default_password')
@ -94,7 +94,7 @@ class GroupForm(forms.ModelForm, CssClassMixin):
class UsersettingsForm(forms.ModelForm, CssClassMixin): class UsersettingsForm(forms.ModelForm, CssClassMixin):
class Meta: class Meta:
model = User model = User
fields = ('username', 'first_name', 'last_name', 'email', 'gender') fields = ('username', 'first_name', 'last_name', 'gender', 'email', 'committee', 'about_me' )
class UserImportForm(forms.Form, CssClassMixin): class UserImportForm(forms.Form, CssClassMixin):

View File

@ -49,6 +49,9 @@ class User(DjangoUser, PersonMixin, Person):
committee = models.CharField( committee = models.CharField(
max_length=100, blank=True, default='', verbose_name=_("Committee"), max_length=100, blank=True, default='', verbose_name=_("Committee"),
help_text=_('Only for filtering the participant list.')) help_text=_('Only for filtering the participant list.'))
about_me = models.TextField(
blank=True, default='', verbose_name=_('About me'),
help_text=_('Your profile text'))
comment = models.TextField( comment = models.TextField(
blank=True, default='', verbose_name=_('Comment'), blank=True, default='', verbose_name=_('Comment'),
help_text=_('Only for notes.')) help_text=_('Only for notes.'))

View File

@ -35,6 +35,11 @@
<p>{{ shown_user.committee }}</p> <p>{{ shown_user.committee }}</p>
{% endif %} {% endif %}
{% if shown_user.about_me %}
<h2>{% trans "About me" %}</h2>
<p>{{ shown_user.about_me }}</p>
{% endif %}
{% if perms.participant.can_manage_participant %} {% if perms.participant.can_manage_participant %}
{% if shown_user.comment %} {% if shown_user.comment %}
<h2>{% trans "Comment" %}</h2> <h2>{% trans "Comment" %}</h2>