From 58344bc3be3af2091bb565cf571f2a9de2249198 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Wed, 4 Nov 2020 09:15:08 +0100 Subject: [PATCH] =?UTF-8?q?Form=20zur=20Pr=C3=BCfung=20und=20Ablehnung=20t?= =?UTF-8?q?rennen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/site.css | 4 ++ templates/_macros.html | 49 ++++++++++++- templates/event/read.html | 2 +- templates/event_date/list.html | 2 +- templates/event_date/read.html | 2 +- templates/event_suggestion/create.html | 2 +- templates/event_suggestion/reject.html | 24 +++++++ templates/event_suggestion/review.html | 68 ++++-------------- templates/manage/events.html | 2 +- templates/manage/members.html | 4 +- templates/manage/organizers.html | 2 +- templates/manage/places.html | 2 +- .../manage/reference_requests_incoming.html | 2 +- templates/manage/references_incoming.html | 2 +- templates/manage/reviews.html | 2 +- templates/planing/list.html | 2 +- templates/reference_request/review.html | 2 +- templates/widget/event_date/read.html | 2 +- translations/de/LC_MESSAGES/messages.mo | Bin 18347 -> 18348 bytes translations/de/LC_MESSAGES/messages.po | 2 +- views/event_suggestion.py | 17 ++++- 21 files changed, 121 insertions(+), 73 deletions(-) create mode 100644 templates/event_suggestion/reject.html diff --git a/static/site.css b/static/site.css index c77630d..25df1cc 100644 --- a/static/site.css +++ b/static/site.css @@ -93,4 +93,8 @@ tr.table-line-through td { .text-highlight { color: #dc3545!important; +} + +.w-normal { + max-width: 1024px; } \ No newline at end of file diff --git a/templates/_macros.html b/templates/_macros.html index 9fe3a47..baa01ea 100644 --- a/templates/_macros.html +++ b/templates/_macros.html @@ -866,7 +866,7 @@ if (URL) {
@@ -919,7 +919,7 @@ if (URL) { {{ render_event_status_pill(reference.event) }} diff --git a/templates/manage/reviews.html b/templates/manage/reviews.html index b7b7c62..ecadc47 100644 --- a/templates/manage/reviews.html +++ b/templates/manage/reviews.html @@ -16,7 +16,7 @@ {{ render_event_review_status_pill(event_suggestion) }} diff --git a/templates/planing/list.html b/templates/planing/list.html index 44d795d..af27b05 100644 --- a/templates/planing/list.html +++ b/templates/planing/list.html @@ -116,7 +116,7 @@ $( function() {
diff --git a/templates/reference_request/review.html b/templates/reference_request/review.html index 70b8764..827302c 100644 --- a/templates/reference_request/review.html +++ b/templates/reference_request/review.html @@ -20,7 +20,7 @@ {{ render_field(form.submit) }} -
+
{{ render_event_props(event, event.start, event.end, dates) }} diff --git a/templates/widget/event_date/read.html b/templates/widget/event_date/read.html index 4e1a2b7..e0063cd 100644 --- a/templates/widget/event_date/read.html +++ b/templates/widget/event_date/read.html @@ -16,7 +16,7 @@ {% endblock %} {% block content %} -
+
{{ render_event_props(event, event_date.start, event_date.end) }}
diff --git a/translations/de/LC_MESSAGES/messages.mo b/translations/de/LC_MESSAGES/messages.mo index b9ec59dc6f0722e893886862c002a633a6bbb5e1..4525aecf315161e897727ad5bf140c63e7cd50e5 100644 GIT binary patch delta 661 zcmXZYPbh-zvuV;e$TUxi>%}7+hh8bQr?hK9*koUr*Qyx zFn~AMgRj_(&Mgo1iDM^u4&|Lal>6o(#Xd#e{ty_mI_pPSk%sbM z6lF8>IEahLaOwnu_>RNqVoWdU$dNLz1kX_UyB1d0)0yr>dvYV0&a@|t!fN$%k0V{s HL(8szsk~A_ delta 659 zcmXZaKS)AR6vy#vVOe34{geKnmHicoAc_q1X<9=N4b@bjq!1+vVGTvRf*@#d5rQ@$ zXsE!jwV|nKtf`k}eiK3Uhit^48%6Mo)>K|Iq?qqVqNl$7wmC1RMiE`HY;wwjj Gn|1%7zfpz& diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po index e5f3334..496f400 100644 --- a/translations/de/LC_MESSAGES/messages.po +++ b/translations/de/LC_MESSAGES/messages.po @@ -647,7 +647,7 @@ msgstr "Unzulässig" #: forms/event_suggestion.py:52 msgid "Reject event suggestion" -msgstr "Vorgeschlagene Veranstaltung ablehen" +msgstr "Vorgeschlagene Veranstaltung ablehnen" #: forms/organizer.py:37 templates/manage/organizers.html:12 #: templates/organizer/create.html:10 diff --git a/views/event_suggestion.py b/views/event_suggestion.py index a607519..48c964b 100644 --- a/views/event_suggestion.py +++ b/views/event_suggestion.py @@ -51,11 +51,23 @@ def event_suggestion_create_for_admin_unit(au_short_name): flash_errors(form) return render_template('event_suggestion/create.html', form=form, admin_unit=admin_unit) -@app.route('/event_suggestion//review', methods=('GET', 'POST')) +@app.route('/event_suggestion//review') def event_suggestion_review(event_suggestion_id): event_suggestion = EventSuggestion.query.get_or_404(event_suggestion_id) access_or_401(event_suggestion.admin_unit, 'event:verify') + return render_template('event_suggestion/review.html', + admin_unit=event_suggestion.admin_unit, + event_suggestion=event_suggestion) + +@app.route('/event_suggestion//reject', methods=('GET', 'POST')) +def event_suggestion_reject(event_suggestion_id): + event_suggestion = EventSuggestion.query.get_or_404(event_suggestion_id) + access_or_401(event_suggestion.admin_unit, 'event:verify') + + if event_suggestion.verified: + return redirect(url_for('event_suggestion_review', event_suggestion_id=event_suggestion.id)) + form = RejectEventSuggestionForm(obj=event_suggestion) if form.validate_on_submit(): @@ -76,8 +88,9 @@ def event_suggestion_review(event_suggestion_id): else: flash_errors(form) - return render_template('event_suggestion/review.html', + return render_template('event_suggestion/reject.html', form=form, + admin_unit=event_suggestion.admin_unit, event_suggestion=event_suggestion) @app.route('/event_suggestion//review_status')