From c8c3e1a8c1fb66bf7d282d012e1de80f55202472 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Tue, 7 Jul 2020 11:39:28 +0200 Subject: [PATCH] =?UTF-8?q?Phone,=20Email=20auch=20f=C3=BCr=20Admin=20Unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 55 +++++- forms/admin_unit.py | 30 +++ forms/event_suggestion.py | 4 +- forms/organization.py | 3 + jsonld.py | 6 + migrations/versions/75c07cb9cfe3_.py | 45 +++++ models.py | 9 + templates/_macros.html | 80 +++++--- .../list.html} | 0 .../{admin_unit.html => admin_unit/read.html} | 58 ++++-- templates/admin_unit/update.html | 56 ++++++ templates/organization/create.html | 2 + templates/organization/read.html | 6 +- templates/organization/update.html | 2 + translations/de/LC_MESSAGES/messages.mo | Bin 4305 -> 4522 bytes translations/de/LC_MESSAGES/messages.po | 174 ++++++++++-------- 16 files changed, 396 insertions(+), 134 deletions(-) create mode 100644 forms/admin_unit.py create mode 100644 migrations/versions/75c07cb9cfe3_.py rename templates/{admin_units.html => admin_unit/list.html} (100%) rename templates/{admin_unit.html => admin_unit/read.html} (58%) create mode 100644 templates/admin_unit/update.html diff --git a/app.py b/app.py index 484c275..7547abb 100644 --- a/app.py +++ b/app.py @@ -25,8 +25,8 @@ app.config['SECURITY_TRACKABLE'] = True app.config['SECURITY_REGISTERABLE'] = True app.config['SECURITY_SEND_REGISTER_EMAIL'] = False app.config['LANGUAGES'] = ['en', 'de'] -app.config['GOOGLE_OAUTH_CLIENT_ID'] = os.environ['GOOGLE_OAUTH_CLIENT_ID'] -app.config['GOOGLE_OAUTH_CLIENT_SECRET'] = os.environ['GOOGLE_OAUTH_CLIENT_SECRET'] +app.config['GOOGLE_OAUTH_CLIENT_ID'] = os.getenv('GOOGLE_OAUTH_CLIENT_ID') +app.config['GOOGLE_OAUTH_CLIENT_SECRET'] = os.getenv('GOOGLE_OAUTH_CLIENT_SECRET') # Generate a nice key using secrets.token_urlsafe() app.config['SECRET_KEY'] = os.environ.get("SECRET_KEY", 'pf9Wkove4IKEAXvy-cQkeDPhv9Cb3Ag-wyJILbq_dFw') @@ -669,8 +669,6 @@ def get_event_suggestions_for_current_user(): @app.before_first_request def create_initial_data(): - return - # Event categories upsert_event_category('Art') upsert_event_category('Book') @@ -834,7 +832,13 @@ def create_initial_data(): # Users admin_role = user_datastore.find_or_create_role("admin") - admin_role.add_permissions(["user:create", "event:verify", "event:create", "event_suggestion:read", "admin_unit.members:read", "organization.members:read"]) + admin_role.add_permissions(["user:create", + "event:verify", + "event:create", + "event_suggestion:read", + "admin_unit:update", + "admin_unit.members:read", + "organization.members:read"]) admin_unit_admin_role = upsert_admin_unit_member_role('admin', ["admin_unit.members:read", "admin_unit.organizations.members:read"]) admin_unit_event_verifier_role = upsert_admin_unit_member_role('event_verifier', ["event:verify", "event:create", "event_suggestion:read"]) @@ -962,18 +966,50 @@ def developer(): @app.route("/admin_units") def admin_units(): - return render_template('admin_units.html', + return render_template('admin_unit/list.html', admin_units=AdminUnit.query.order_by(asc(func.lower(AdminUnit.name))).all()) @app.route('/admin_unit/') def admin_unit(admin_unit_id): - admin_unit = AdminUnit.query.filter_by(id = admin_unit_id).first() + admin_unit = AdminUnit.query.get_or_404(admin_unit_id) current_user_member = AdminUnitMember.query.with_parent(admin_unit).filter_by(user_id = current_user.id).first() if current_user.is_authenticated else None - return render_template('admin_unit.html', + return render_template('admin_unit/read.html', admin_unit=admin_unit, current_user_member=current_user_member, - can_list_admin_unit_members=can_list_admin_unit_members(admin_unit)) + can_list_admin_unit_members=can_list_admin_unit_members(admin_unit), + can_update_admin_unit=has_current_user_permission('admin_unit:update')) + +def update_admin_unit_with_form(admin_unit, form): + form.populate_obj(admin_unit) + + if form.logo_file.data: + fs = form.logo_file.data + admin_unit.logo = upsert_image_with_data(admin_unit.logo, fs.read(), fs.content_type) + +@app.route('/admin_unit//update', methods=('GET', 'POST')) +def admin_unit_update(admin_unit_id): + if not has_current_user_permission('admin_unit:update'): + abort(401) + + admin_unit = AdminUnit.query.get_or_404(admin_unit_id) + form = UpdateAdminUnitForm(obj=admin_unit) + + if form.validate_on_submit(): + if not admin_unit.location: + admin_unit.location = Location() + update_admin_unit_with_form(admin_unit, form) + + try: + db.session.commit() + flash(gettext('Admin unit successfully updated'), 'success') + return redirect(url_for('admin_unit', admin_unit_id=admin_unit.id)) + except SQLAlchemyError as e: + flash(handleSqlError(e), 'danger') + + return render_template('admin_unit/update.html', + form=form, + admin_unit=admin_unit) @app.route("/organizations") def organizations(): @@ -1187,6 +1223,7 @@ from forms.event import CreateEventForm, UpdateEventForm from forms.event_suggestion import CreateEventSuggestionForm from forms.place import CreatePlaceForm, UpdatePlaceForm from forms.organization import CreateOrganizationForm, UpdateOrganizationForm +from forms.admin_unit import CreateAdminUnitForm, UpdateAdminUnitForm def update_event_with_form(event, form): form.populate_obj(event) diff --git a/forms/admin_unit.py b/forms/admin_unit.py new file mode 100644 index 0000000..d1b1aee --- /dev/null +++ b/forms/admin_unit.py @@ -0,0 +1,30 @@ +from flask_babelex import lazy_gettext +from flask_wtf import FlaskForm +from flask_wtf.file import FileField, FileAllowed +from wtforms import StringField, SubmitField, DecimalField, TextAreaField, FormField, SelectField +from wtforms.fields.html5 import EmailField, TelField +from wtforms.validators import DataRequired, Optional +import decimal +from models import Location + +class AdminUnitLocationForm(FlaskForm): + street = StringField(lazy_gettext('Street'), validators=[Optional()]) + postalCode = StringField(lazy_gettext('Postal code'), validators=[DataRequired()]) + city = StringField(lazy_gettext('City'), validators=[DataRequired()]) + state = StringField(lazy_gettext('State'), validators=[Optional()]) + latitude = DecimalField(lazy_gettext('Latitude'), places=16, validators=[Optional()]) + longitude = DecimalField(lazy_gettext('Longitude'), places=16, validators=[Optional()]) + +class BaseAdminUnitForm(FlaskForm): + name = StringField(lazy_gettext('Name'), validators=[DataRequired()]) + url = StringField(lazy_gettext('Link URL'), validators=[Optional()]) + email = EmailField(lazy_gettext('Email'), validators=[Optional()]) + phone = TelField(lazy_gettext('Phone'), validators=[Optional()]) + logo_file = FileField(lazy_gettext('Logo'), validators=[FileAllowed(['jpg', 'jpeg', 'png'], lazy_gettext('Images only!'))]) + location = FormField(AdminUnitLocationForm, default=lambda: Location()) + +class CreateAdminUnitForm(BaseAdminUnitForm): + submit = SubmitField(lazy_gettext("Create admin unit")) + +class UpdateAdminUnitForm(BaseAdminUnitForm): + submit = SubmitField(lazy_gettext("Update admin unit")) \ No newline at end of file diff --git a/forms/event_suggestion.py b/forms/event_suggestion.py index 3c4d504..3cb9197 100644 --- a/forms/event_suggestion.py +++ b/forms/event_suggestion.py @@ -1,7 +1,7 @@ from flask_babelex import lazy_gettext from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, TextAreaField -from wtforms.fields.html5 import DateTimeLocalField +from wtforms.fields.html5 import DateTimeLocalField, EmailField from wtforms.validators import DataRequired, Optional class CreateEventSuggestionForm(FlaskForm): @@ -18,4 +18,4 @@ class CreateEventSuggestionForm(FlaskForm): host_name = StringField(lazy_gettext('Event host'), validators=[DataRequired()]) contact_name = StringField(lazy_gettext('Contact name'), validators=[DataRequired()]) - contact_email = StringField(lazy_gettext('Contact email'), validators=[DataRequired()]) + contact_email = EmailField(lazy_gettext('Contact email'), validators=[DataRequired()]) diff --git a/forms/organization.py b/forms/organization.py index db0ae96..45738e6 100644 --- a/forms/organization.py +++ b/forms/organization.py @@ -2,6 +2,7 @@ from flask_babelex import lazy_gettext from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, SubmitField, DecimalField, TextAreaField, FormField, SelectField +from wtforms.fields.html5 import EmailField, TelField from wtforms.validators import DataRequired, Optional import decimal @@ -16,6 +17,8 @@ class OrganizationLocationForm(FlaskForm): class BaseOrganizationForm(FlaskForm): name = StringField(lazy_gettext('Name'), validators=[DataRequired()]) url = StringField(lazy_gettext('Link URL'), validators=[Optional()]) + email = EmailField(lazy_gettext('Email'), validators=[Optional()]) + phone = TelField(lazy_gettext('Phone'), validators=[Optional()]) logo_file = FileField(lazy_gettext('Logo'), validators=[FileAllowed(['jpg', 'jpeg', 'png'], lazy_gettext('Images only!'))]) legal_name = TextAreaField(lazy_gettext('Legal name'), validators=[Optional()]) location = FormField(OrganizationLocationForm) diff --git a/jsonld.py b/jsonld.py index d2115d2..851fcd8 100644 --- a/jsonld.py +++ b/jsonld.py @@ -22,6 +22,12 @@ def get_sd_for_org(organization): if organization.logo_id: result["logo"] = url_for('image', id=organization.logo_id) + if organization.email: + result["email"] = organization.email + + if organization.phone: + result["phone"] = organization.phone + return result def get_sd_for_admin_unit(admin_unit): diff --git a/migrations/versions/75c07cb9cfe3_.py b/migrations/versions/75c07cb9cfe3_.py new file mode 100644 index 0000000..5228d41 --- /dev/null +++ b/migrations/versions/75c07cb9cfe3_.py @@ -0,0 +1,45 @@ +"""empty message + +Revision ID: 75c07cb9cfe3 +Revises: abf0f671ba27 +Create Date: 2020-07-07 10:11:08.217831 + +""" +from alembic import op +import sqlalchemy as sa +import sqlalchemy_utils + + +# revision identifiers, used by Alembic. +revision = '75c07cb9cfe3' +down_revision = 'abf0f671ba27' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('adminunit', sa.Column('email', sa.Unicode(length=255), nullable=True)) + op.add_column('adminunit', sa.Column('location_id', sa.Integer(), nullable=True)) + op.add_column('adminunit', sa.Column('logo_id', sa.Integer(), nullable=True)) + op.add_column('adminunit', sa.Column('phone', sa.Unicode(length=255), nullable=True)) + op.add_column('adminunit', sa.Column('url', sa.String(length=255), nullable=True)) + op.create_foreign_key(None, 'adminunit', 'image', ['logo_id'], ['id']) + op.create_foreign_key(None, 'adminunit', 'location', ['location_id'], ['id']) + op.add_column('organization', sa.Column('email', sa.Unicode(length=255), nullable=True)) + op.add_column('organization', sa.Column('phone', sa.Unicode(length=255), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('organization', 'phone') + op.drop_column('organization', 'email') + op.drop_constraint(None, 'adminunit', type_='foreignkey') + op.drop_constraint(None, 'adminunit', type_='foreignkey') + op.drop_column('adminunit', 'url') + op.drop_column('adminunit', 'phone') + op.drop_column('adminunit', 'logo_id') + op.drop_column('adminunit', 'location_id') + op.drop_column('adminunit', 'email') + # ### end Alembic commands ### diff --git a/models.py b/models.py index fdc593b..8253d4b 100644 --- a/models.py +++ b/models.py @@ -99,6 +99,8 @@ class Organization(db.Model, TrackableMixin): logo_id = db.Column(db.Integer, db.ForeignKey('image.id')) logo = db.relationship('Image', uselist=False) url = Column(String(255)) + email = Column(Unicode(255)) + phone = Column(Unicode(255)) members = relationship('OrgMember', backref=backref('organization', lazy=True)) ### Admin Unit @@ -153,6 +155,13 @@ class AdminUnit(db.Model, TrackableMixin): name = Column(Unicode(255), unique=True) members = relationship('AdminUnitMember', backref=backref('adminunit', lazy=True)) organizations = relationship('AdminUnitOrg', backref=backref('adminunit', lazy=True)) + location_id = db.Column(db.Integer, db.ForeignKey('location.id')) + location = db.relationship('Location') + logo_id = db.Column(db.Integer, db.ForeignKey('image.id')) + logo = db.relationship('Image', uselist=False) + url = Column(String(255)) + email = Column(Unicode(255)) + phone = Column(Unicode(255)) # Universal Types diff --git a/templates/_macros.html b/templates/_macros.html index 8c8dc0b..c14e43d 100644 --- a/templates/_macros.html +++ b/templates/_macros.html @@ -56,7 +56,13 @@ {% endif %} {% endmacro %} -{% macro render_location(location) %}{{ location.street }}, {{ location.postalCode }} {{ location.city }}{% endmacro %} +{% macro render_location(location) %} +{%- if location.street -%} + {{ location.street }}, {{ location.postalCode }} {{ location.city }} +{%- else -%} + {{ location.postalCode }} {{ location.city }} +{%- endif -%} +{% endmacro %} {% macro render_place(place) %} {%- if place.location -%} @@ -148,6 +154,24 @@ {% endif %} {% endmacro %} +{% macro render_email_prop(email) %} +{% if email %} +
+ + {{ email }} +
+{% endif %} +{% endmacro %} + +{% macro render_phone_prop(phone) %} +{% if phone %} +
+ + {{ phone }} +
+{% endif %} +{% endmacro %} + {% macro render_location_prop(location) %} {% if location %}
@@ -159,7 +183,13 @@ {% macro render_image(image_id) %} {% if image_id %} - + +{% endif %} +{% endmacro %} + +{% macro render_logo(image_id) %} +{% if image_id %} + {% endif %} {% endmacro %} @@ -209,20 +239,14 @@
{{ event.place.description }}
{% endif %} - {% if event.place.url %} -
{{ render_link_prop(event.place.url) }}
- {% endif %} - - {% if event.place.location %} -

- {{ event.place.location.street }}
- {{ event.place.location.postalCode }} {{ event.place.location.city }} -

+
+ {{ render_link_prop(event.place.url) }} + {{ render_location_prop(event.place.location) }} +

- {{ _('Show directions') }} + {{ _('Show directions') }}

- {% endif %}
@@ -234,25 +258,33 @@ {% if event.host.admin_unit %}
{{ event.host.admin_unit.name }}
+ + {% if event.host.admin_unit.logo_id %} +
{{ render_logo(event.host.admin_unit.logo_id) }}
+ {% endif %} + +
+ {{ render_link_prop(event.host.admin_unit.url) }} + {{ render_email_prop(event.host.admin_unit.email) }} + {{ render_phone_prop(event.host.admin_unit.phone) }} + {{ render_location_prop(event.host.admin_unit.location) }} +
+ {% endif %} {% if event.host.organization %}
{{ event.host.organization.name }}
{% if event.host.organization.logo_id %} -
{{ render_image(event.host.organization.logo_id) }}
+
{{ render_logo(event.host.organization.logo_id) }}
{% endif %} - {% if event.host.organization.url %} -
{{ render_link_prop(event.host.organization.url) }}
- {% endif %} - - {% if event.host.organization.location %} -

- {{ event.host.organization.location.street }}
- {{ event.host.organization.location.postalCode }} {{ event.host.organization.location.city }} -

- {% endif %} +
+ {{ render_link_prop(event.host.organization.url) }} + {{ render_email_prop(event.host.organization.email) }} + {{ render_phone_prop(event.host.organization.phone) }} + {{ render_location_prop(event.host.organization.location) }} +
{% endif %} diff --git a/templates/admin_units.html b/templates/admin_unit/list.html similarity index 100% rename from templates/admin_units.html rename to templates/admin_unit/list.html diff --git a/templates/admin_unit.html b/templates/admin_unit/read.html similarity index 58% rename from templates/admin_unit.html rename to templates/admin_unit/read.html index 2cd442e..314d91c 100644 --- a/templates/admin_unit.html +++ b/templates/admin_unit/read.html @@ -1,5 +1,5 @@ {% extends "layout.html" %} -{% from "_macros.html" import render_events %} +{% from "_macros.html" import render_logo, render_phone_prop, render_email_prop, render_events, render_location_prop, render_link_prop, render_image %} {% block title %} {{ admin_unit.name }} {% endblock %} @@ -7,29 +7,49 @@

{{ admin_unit.name }}

+ {% if can_update_admin_unit %} + + {% endif %} + + + {% if current_user_member or can_list_admin_unit_members %} + + {% endif %} + + +
+
+ +
+ {{ render_location_prop(admin_unit.location) }} + {{ render_link_prop(admin_unit.url) }} + {{ render_email_prop(admin_unit.email) }} + {{ render_phone_prop(admin_unit.phone) }} +
+ + {% if admin_unit.logo_id %} +
{{ render_logo(admin_unit.logo_id) }}
+ {% endif %} + +
+ {% if current_user_member or can_list_admin_unit_members %} -
+
{% if current_user_member %}
{{ _('You are a member of this admin unit.') }} @@ -59,7 +79,7 @@ {% endif %}
{% endif %} -
+
diff --git a/templates/admin_unit/update.html b/templates/admin_unit/update.html new file mode 100644 index 0000000..a909259 --- /dev/null +++ b/templates/admin_unit/update.html @@ -0,0 +1,56 @@ +{% extends "layout.html" %} +{% from "_macros.html" import render_google_place_autocomplete_header, render_google_place_autocomplete_field, render_field_with_errors, render_field %} + +{% block header %} +{{ render_google_place_autocomplete_header(True) }} +{% endblock %} + +{% block content %} + +

{{ _('Update admin unit') }}

+ + {{ form.hidden_tag() }} + +
+
+ {{ _('Admin unit') }} +
+
+ {{ render_field_with_errors(form.name) }} +
+
+ +
+
+ {{ _('Location') }} +
+
+ + {{ render_google_place_autocomplete_field() }} + + {{ form.location.hidden_tag() }} + {{ render_field_with_errors(form.location.street) }} + {{ render_field_with_errors(form.location.postalCode) }} + {{ render_field_with_errors(form.location.city) }} + {{ render_field_with_errors(form.location.state) }} + {{ render_field_with_errors(form.location.latitude) }} + {{ render_field_with_errors(form.location.longitude) }} +
+
+ +
+
+ {{ _('Additional information') }} +
+
+ {{ render_field_with_errors(form.url) }} + {{ render_field_with_errors(form.email) }} + {{ render_field_with_errors(form.phone) }} + {{ render_field_with_errors(form.logo_file) }} +
+
+ + {{ render_field(form.submit) }} + + +{% endblock %} diff --git a/templates/organization/create.html b/templates/organization/create.html index 99c833d..dfbcd06 100644 --- a/templates/organization/create.html +++ b/templates/organization/create.html @@ -45,6 +45,8 @@
{{ render_field_with_errors(form.url) }} + {{ render_field_with_errors(form.email) }} + {{ render_field_with_errors(form.phone) }} {{ render_field_with_errors(form.logo_file) }}
diff --git a/templates/organization/read.html b/templates/organization/read.html index 422a242..3997034 100644 --- a/templates/organization/read.html +++ b/templates/organization/read.html @@ -1,5 +1,5 @@ {% extends "layout.html" %} -{% from "_macros.html" import render_events, render_location_prop, render_link_prop, render_image %} +{% from "_macros.html" import render_logo, render_phone_prop, render_email_prop, render_events, render_location_prop, render_link_prop, render_image %} {% block title %} {{ organization.name }} {% endblock %} @@ -39,10 +39,12 @@
{{ render_location_prop(organization.location) }} {{ render_link_prop(organization.url) }} + {{ render_email_prop(organization.email) }} + {{ render_phone_prop(organization.phone) }}
{% if organization.logo_id %} -
{{ render_image(organization.logo_id) }}
+
{{ render_logo(organization.logo_id) }}
{% endif %} diff --git a/templates/organization/update.html b/templates/organization/update.html index 11e8810..696033c 100644 --- a/templates/organization/update.html +++ b/templates/organization/update.html @@ -45,6 +45,8 @@
{{ render_field_with_errors(form.url) }} + {{ render_field_with_errors(form.email) }} + {{ render_field_with_errors(form.phone) }} {{ render_field_with_errors(form.logo_file) }}
diff --git a/translations/de/LC_MESSAGES/messages.mo b/translations/de/LC_MESSAGES/messages.mo index c093a9be9db90bd2d56a538aa0c7f06de90339f3..2786f3249709aa91e05ed344d5488408bb90194a 100644 GIT binary patch delta 1603 zcmZA1e`w5c9LMp`&E0LcA2&P3Y`8O<7|KkYC@lQpXBOti)Vl0DJH9*Y?g-^rq=llh zKc+-l`H??pe&!ERmVYD~X@7{CfBYj6iST^!k#c?S`}ll5_x-#-@6Y@5-JVXkJTdbs zY$SkCx4>s_p-{{l0h$_JGTE2HUBvlvc4Ij zp+Fyyq|8s$j{VeAl^AXw1oqj}BWEc;t62-`nDMfNHm3DkOa+x}AieI0h zp$C_s&ZrSpfhMfPcGM0};5592D)A6%p&zKky=+e<4Wjy`sCZ%2b5*DXYfu%OY5SSE zG?d{&)P$9&39GFePyw4!6XVtn`};mr;De}2blLG9)W*)D;$E>{L&drI$Bem0Lkm2@ zI(&xH(N8obHVYMCJ}TfM)Jxld)tE%4m>yIj7jYO~MIF&~)IYYzs5tLXao(d}fB)Zq zH<-j5RLT$eI1VGI!1GXnR-j(SR@6d!QSU-0>PSvw1g~QSK1aQLA5ceH$W8Cac&x!1 ztkQyOY3RYdsJFAbB)ilX4cE7{#}kosBA$vQ)0;Ot$z*HVb@xQlJ6d8XrzLy9cf{Ks zi@SY3|JEFD+xCQ$ZO{7@i2a?`w?0th$&E&8YvNNnmtQ2((Kfl?D+eR766D4f_6aAbEX1GvmC^JoC(8s$#6n`%skA zWBfGoTgvaCU%mf74FR*obax_;9pP1g$1opHV=i9A9PGppCa@51Vi@l^2XG<%7ju2j z-q28>NmPIt)B-;+53|T)!Qk9@7&SlUtZ?J&a4F;U&b?Sg{}e938>n~>P~Q(=*gUf# z8c_yDPzz7|`-9mR=P#VkxQ}gVM^V&{R-opuan@mk{ubA7bp1o9?^{vdT|mX@!XWEg zFAZgO8&!dnv)?(0Dsjd+jO1ja7{hVY5zQcv`I)RZ`KSdWScav}&8P$pqo>lIq@mKa zITNS_Qm7q1MFk#0&3}a@IEvcwXXh;HYy<2@mZ0KP;}WbvE!==g>_8s%*Tkc4;2aXe zu3{y2<0^cHI->Vjgx~O*k0aqAm3V?IRpJyb!VGHOYhv5}iQ>x{M0kjXc)NOGj`Yb@?7)IS!#VG>L05ROt@7elsdyD{5XFYQeLpid}O3E>vPk)cjkh`FEWUQStjx-+39=77(un6m&*V3&b#vEeZeV;($d3K$KZf74>;Y;MP zXbJ!R6S3ir0aP(}TKmk1=FTX2Ude_9LjH z_=L+ai@IDfZl2CCj=Brma5e76N<5F6*N3`%&!frCKwWYw(2+h7Z1E>2a(|{j=H>W8 iwJSGls*l&Ezvj35l3n3D>3CtgKm8;U@+IF!$NvJy34=5M diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po index 3c4422f..d5ce6ea 100644 --- a/translations/de/LC_MESSAGES/messages.po +++ b/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-07-06 18:36+0200\n" +"POT-Creation-Date: 2020-07-07 11:37+0200\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -94,31 +94,35 @@ msgstr "Sport" msgid "Event_Other" msgstr "Sonstiges" -#: app.py:1026 +#: app.py:1005 +msgid "Admin unit successfully updated" +msgstr "Verwaltungseinheit erfolgreich aktualisiert" + +#: app.py:1062 msgid "Organization successfully created" msgstr "Organisation erfolgreich erstellt" -#: app.py:1046 +#: app.py:1082 msgid "Organization successfully updated" msgstr "Organisation erfolgreich aktualisiert" -#: app.py:1101 +#: app.py:1137 msgid "Place successfully updated" msgstr "Ort erfolgreich aktualisiert" -#: app.py:1124 +#: app.py:1160 msgid "Place successfully created" msgstr "Ort erfolgreich erstellt" -#: app.py:1225 +#: app.py:1262 msgid "Event successfully created" msgstr "Veranstaltung erfolgreich erstellt" -#: app.py:1246 +#: app.py:1283 msgid "Event successfully updated" msgstr "Veranstaltung erfolgreich aktualisiert" -#: app.py:1283 +#: app.py:1320 msgid "Event suggestion successfully created" msgstr "Veranstaltungsvorschlag erfolgreich erstellt" @@ -126,130 +130,103 @@ msgstr "Veranstaltungsvorschlag erfolgreich erstellt" msgid "Successfully signed in." msgstr "Erfolgreich eingeloggt." -#: templates/_macros.html:72 templates/event/create.html:6 +#: templates/_macros.html:78 templates/event/create.html:6 msgid "Create event" msgstr "Veranstaltung erstellen" -#: templates/_macros.html:74 templates/event_suggestion/create.html:6 +#: templates/_macros.html:80 templates/event_suggestion/create.html:6 msgid "Suggest event" msgstr "Veranstaltung vorschlagen" -#: templates/_macros.html:80 templates/event_suggestion/list.html:3 +#: templates/_macros.html:86 templates/event_suggestion/list.html:3 #: templates/event_suggestion/list.html:7 msgid "Event suggestions" msgstr "Veranstaltungsvorschläge" -#: templates/_macros.html:93 templates/_macros.html:174 +#: templates/_macros.html:99 templates/_macros.html:204 #: templates/event/list.html:16 templates/event_suggestion/list.html:13 #: templates/event_suggestion/read.html:18 msgid "Date" msgstr "Datum" -#: templates/_macros.html:94 templates/admin/admin_units.html:18 -#: templates/admin_unit.html:45 templates/admin_unit.html:67 -#: templates/admin_units.html:13 templates/event/list.html:17 +#: templates/_macros.html:100 templates/admin/admin_units.html:18 +#: templates/admin_unit/list.html:13 templates/admin_unit/read.html:65 +#: templates/admin_unit/read.html:87 templates/event/list.html:17 #: templates/event_suggestion/list.html:14 templates/home.html:22 #: templates/home.html:44 templates/organization/list.html:19 -#: templates/organization/read.html:64 templates/place/list.html:19 +#: templates/organization/read.html:66 templates/place/list.html:19 #: templates/profile.html:15 templates/profile.html:37 msgid "Name" msgstr "Name" -#: templates/_macros.html:95 templates/_macros.html:192 -#: templates/_macros.html:231 templates/event/create.html:29 +#: templates/_macros.html:101 templates/_macros.html:222 +#: templates/_macros.html:255 templates/event/create.html:29 #: templates/event/list.html:18 templates/event/update.html:29 #: templates/event_suggestion/list.html:15 msgid "Host" msgstr "Veranstalter" -#: templates/_macros.html:96 templates/_macros.html:154 -#: templates/_macros.html:175 templates/event/list.html:19 -#: templates/event_suggestion/list.html:16 +#: templates/_macros.html:102 templates/_macros.html:178 +#: templates/_macros.html:205 templates/admin_unit/update.html:25 +#: templates/event/list.html:19 templates/event_suggestion/list.html:16 #: templates/event_suggestion/read.html:41 #: templates/organization/create.html:26 templates/organization/update.html:26 #: templates/place/create.html:29 templates/place/update.html:29 msgid "Location" msgstr "Standort" -#: templates/_macros.html:106 templates/_macros.html:177 +#: templates/_macros.html:112 templates/_macros.html:207 #: templates/event/list.html:29 msgid "Verified" msgstr "Verifiziert" -#: templates/_macros.html:119 +#: templates/_macros.html:125 msgid "Show all events" msgstr "Alle Veranstaltungen anzeigen" -#: templates/_macros.html:135 +#: templates/_macros.html:141 msgid "Show on Google Maps" msgstr "Auf Google Maps anzeigen" -#: templates/_macros.html:145 +#: templates/_macros.html:151 msgid "Link" msgstr "Link" -#: templates/_macros.html:169 templates/event/create.html:13 +#: templates/_macros.html:160 +msgid "Email" +msgstr "Email" + +#: templates/_macros.html:169 +msgid "Phone" +msgstr "Telefon" + +#: templates/_macros.html:199 templates/event/create.html:13 #: templates/event/update.html:13 templates/event_suggestion/read.html:13 msgid "Event" msgstr "Veranstaltung" -#: templates/_macros.html:190 +#: templates/_macros.html:220 msgid "Category" msgstr "Kategorie" -#: templates/_macros.html:199 templates/event/create.html:38 +#: templates/_macros.html:229 templates/event/create.html:38 #: templates/event/update.html:38 templates/place/create.html:20 #: templates/place/update.html:20 msgid "Place" msgstr "Ort" -#: templates/_macros.html:223 +#: templates/_macros.html:248 msgid "Show directions" msgstr "Anreise planen" -#: templates/_macros.html:264 +#: templates/_macros.html:296 msgid "Sign in with Google" msgstr "Mit Google anmelden" -#: templates/_macros.html:324 +#: templates/_macros.html:356 msgid "Search location on Google" msgstr "Ort bei Google suchen" -#: templates/admin_unit.html:14 templates/organization/read.html:23 -msgid "Members" -msgstr "Mitglieder" - -#: templates/admin_unit.html:17 templates/admin_unit.html:21 -#: templates/layout.html:64 templates/organization/list.html:3 -#: templates/organization/list.html:7 templates/profile.html:32 -msgid "Organizations" -msgstr "Organisationen" - -#: templates/admin_unit.html:25 templates/event/list.html:4 -#: templates/event/list.html:8 templates/event/read.html:10 -#: templates/event_date/read.html:16 templates/layout.html:61 -#: templates/organization/read.html:27 templates/place/read.html:22 -msgid "Events" -msgstr "Veranstaltungen" - -#: templates/admin_unit.html:35 -msgid "You are a member of this admin unit." -msgstr "Du bist Mitglied dieser Verwaltungseinheit" - -#: templates/admin_unit.html:46 templates/admin_unit.html:68 -#: templates/home.html:23 templates/home.html:45 -#: templates/organization/read.html:65 templates/profile.html:16 -#: templates/profile.html:38 -msgid "Roles" -msgstr "Rollen" - -#: templates/admin/admin.html:15 templates/admin/admin_units.html:3 -#: templates/admin/admin_units.html:10 templates/admin_units.html:3 -#: templates/admin_units.html:7 templates/layout.html:63 -#: templates/profile.html:10 -msgid "Admin Units" -msgstr "Verwaltungseinheiten" - #: templates/home.html:7 msgid "Hi there!" msgstr "Moin!" @@ -264,15 +241,42 @@ msgstr "Termine" msgid "Your Admin Units" msgstr "Deine Verwaltungseinheiten" +#: templates/admin_unit/read.html:66 templates/admin_unit/read.html:88 +#: templates/home.html:23 templates/home.html:45 +#: templates/organization/read.html:67 templates/profile.html:16 +#: templates/profile.html:38 +msgid "Roles" +msgstr "Rollen" + #: templates/home.html:39 msgid "Your Organizations" msgstr "Deine Organisationen" +#: templates/admin_unit/read.html:30 templates/event/list.html:4 +#: templates/event/list.html:8 templates/event/read.html:10 +#: templates/event_date/read.html:16 templates/layout.html:61 +#: templates/organization/read.html:27 templates/place/read.html:22 +msgid "Events" +msgstr "Veranstaltungen" + #: templates/layout.html:62 templates/place/list.html:3 #: templates/place/list.html:7 msgid "Places" msgstr "Orte" +#: templates/admin/admin.html:15 templates/admin/admin_units.html:3 +#: templates/admin/admin_units.html:10 templates/admin_unit/list.html:3 +#: templates/admin_unit/list.html:7 templates/layout.html:63 +#: templates/profile.html:10 +msgid "Admin Units" +msgstr "Verwaltungseinheiten" + +#: templates/admin_unit/read.html:27 templates/layout.html:64 +#: templates/organization/list.html:3 templates/organization/list.html:7 +#: templates/profile.html:32 +msgid "Organizations" +msgstr "Organisationen" + #: templates/developer/read.html:4 templates/developer/read.html:10 #: templates/layout.html:65 msgid "Developer" @@ -291,17 +295,35 @@ msgstr "Administration" msgid "Logout" msgstr "Ausloggen" -#: templates/event/create.html:47 templates/event/update.html:47 -#: templates/organization/create.html:44 templates/organization/update.html:44 -#: templates/place/create.html:44 templates/place/update.html:44 -msgid "Additional information" -msgstr "Zusätzliche Informationen" +#: templates/admin_unit/read.html:12 templates/admin_unit/update.html:10 +msgid "Update admin unit" +msgstr "Verwaltungseinheit aktualisieren" -#: templates/event/create.html:59 templates/event/update.html:59 -#: templates/organization/create.html:54 +#: templates/admin_unit/read.html:19 templates/organization/read.html:19 +#: templates/place/read.html:19 +msgid "Info" +msgstr "Info" + +#: templates/admin_unit/read.html:23 templates/organization/read.html:23 +msgid "Members" +msgstr "Mitglieder" + +#: templates/admin_unit/read.html:55 +msgid "You are a member of this admin unit." +msgstr "Du bist Mitglied dieser Verwaltungseinheit" + +#: templates/admin_unit/update.html:16 templates/event/create.html:59 +#: templates/event/update.html:59 templates/organization/create.html:56 msgid "Admin unit" msgstr "Verwaltungseinheit" +#: templates/admin_unit/update.html:43 templates/event/create.html:47 +#: templates/event/update.html:47 templates/organization/create.html:44 +#: templates/organization/update.html:44 templates/place/create.html:44 +#: templates/place/update.html:44 +msgid "Additional information" +msgstr "Zusätzliche Informationen" + #: templates/event/read.html:20 msgid "Mark event as unverified" msgstr "Diese Veranstaltung als nicht verifiziert markieren" @@ -375,11 +397,7 @@ msgstr "Organisation" msgid "Update organization" msgstr "Organisation aktualisieren" -#: templates/organization/read.html:19 templates/place/read.html:19 -msgid "Info" -msgstr "Info" - -#: templates/organization/read.html:54 +#: templates/organization/read.html:56 msgid "You are a member of this organization." msgstr "Du bist Mitglied dieser Organisation"