From 74f28d3be2472eb53b851383563933214d875462 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Fri, 9 Jun 2023 13:33:27 +0200 Subject: [PATCH] Event planning #491 --- cypress/e2e/{planing.cy.js => planning.cy.js} | 9 +- messages.pot | 340 +++++++++-------- project/__init__.py | 2 +- project/access.py | 17 + project/api/event_date/resources.py | 3 +- project/forms/event.py | 12 +- project/forms/planing.py | 36 -- project/forms/planning.py | 50 +++ project/models/event.py | 1 + project/models/user.py | 9 + project/services/event.py | 61 +-- project/services/event_search.py | 27 +- .../vue/common/event-warning-pills.vue.js | 4 + project/static/vue/events/import.vue.js | 3 + project/static/vue/planning/list.vue.js | 278 ++++++++++++++ project/templates/_macros.html | 8 +- project/templates/event/create.html | 3 + project/templates/event_date/list.html | 6 +- project/templates/layout.html | 5 +- project/templates/layout_vue.html | 45 ++- project/templates/manage/events.html | 12 +- project/templates/manage/organizers.html | 8 +- project/templates/manage/places.html | 12 +- project/templates/planing/list.html | 138 ------- project/templates/planning/list.html | 110 ++++++ .../translations/de/LC_MESSAGES/messages.mo | Bin 44971 -> 45395 bytes .../translations/de/LC_MESSAGES/messages.po | 347 ++++++++++-------- .../translations/en/LC_MESSAGES/messages.mo | Bin 4079 -> 4079 bytes .../translations/en/LC_MESSAGES/messages.po | 343 +++++++++-------- project/views/event.py | 2 + project/views/planing.py | 22 -- project/views/planning.py | 27 ++ tests/api/test_event_date.py | 36 ++ tests/seeder.py | 23 +- tests/views/test_planing.py | 9 - tests/views/test_planning.py | 18 + 36 files changed, 1270 insertions(+), 756 deletions(-) rename cypress/e2e/{planing.cy.js => planning.cy.js} (52%) delete mode 100644 project/forms/planing.py create mode 100644 project/forms/planning.py create mode 100644 project/static/vue/planning/list.vue.js delete mode 100644 project/templates/planing/list.html create mode 100644 project/templates/planning/list.html delete mode 100644 project/views/planing.py create mode 100644 project/views/planning.py delete mode 100644 tests/views/test_planing.py create mode 100644 tests/views/test_planning.py diff --git a/cypress/e2e/planing.cy.js b/cypress/e2e/planning.cy.js similarity index 52% rename from cypress/e2e/planing.cy.js rename to cypress/e2e/planning.cy.js index 5b7d7e5..d1a2e56 100644 --- a/cypress/e2e/planing.cy.js +++ b/cypress/e2e/planning.cy.js @@ -1,12 +1,11 @@ -describe("Planing", () => { +describe("Planning", () => { it("search", () => { + cy.login(); cy.createAdminUnit().then(function (adminUnitId) { cy.createEvent(adminUnitId).then(function (eventId) { - cy.visit("/planing"); - cy.screenshot("search-form"); - cy.screenshotDatepicker("#date_from-user"); - cy.get('#submit').click(); + cy.visit("/planning"); + cy.wait(2000); // Wait for Vue to load cy.screenshot("result"); }); }); diff --git a/messages.pot b/messages.pot index 090e51f..207b6c8 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-06-02 12:16+0200\n" +"POT-Creation-Date: 2023-06-09 13:32+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -202,24 +202,24 @@ msgstr "" msgid "You have received an invitation" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:334 +#: project/forms/admin.py:11 project/templates/layout.html:337 #: project/views/root.py:55 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:12 project/templates/layout.html:339 +#: project/forms/admin.py:12 project/templates/layout.html:342 #: project/views/root.py:67 msgid "Legal notice" msgstr "" -#: project/forms/admin.py:13 project/templates/_macros.html:1461 -#: project/templates/layout.html:343 +#: project/forms/admin.py:13 project/templates/_macros.html:1465 +#: project/templates/layout.html:346 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:83 project/views/root.py:75 msgid "Contact" msgstr "" -#: project/forms/admin.py:14 project/templates/layout.html:347 +#: project/forms/admin.py:14 project/templates/layout.html:350 #: project/views/root.py:83 msgid "Privacy" msgstr "" @@ -260,7 +260,7 @@ msgstr "" #: project/forms/admin_unit_member.py:30 project/forms/event.py:107 #: project/forms/event_suggestion.py:38 project/forms/organizer.py:33 #: project/forms/user.py:18 project/forms/user.py:23 -#: project/templates/_macros.html:246 project/templates/_macros.html:1557 +#: project/templates/_macros.html:246 project/templates/_macros.html:1561 #: project/templates/admin/admin.html:27 project/templates/admin/email.html:4 #: project/templates/admin/email.html:66 project/templates/admin/users.html:19 #: project/templates/manage/organizers.html:21 @@ -365,9 +365,9 @@ msgstr "" msgid "Street" msgstr "" -#: project/forms/admin_unit.py:18 project/forms/event.py:453 +#: project/forms/admin_unit.py:18 project/forms/event.py:461 #: project/forms/event_date.py:52 project/forms/event_place.py:16 -#: project/forms/organizer.py:16 +#: project/forms/organizer.py:16 project/forms/planning.py:44 msgid "Postal code" msgstr "" @@ -407,7 +407,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:48 project/templates/_macros.html:1599 +#: project/forms/admin_unit.py:48 project/templates/_macros.html:1603 msgid "Short name must contain only letters numbers or underscore" msgstr "" @@ -428,13 +428,13 @@ msgstr "" #: project/forms/admin_unit.py:61 project/forms/event.py:108 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:34 -#: project/templates/_macros.html:305 +#: project/templates/_macros.html:309 #: project/templates/manage/organizers.html:20 msgid "Phone" msgstr "" #: project/forms/admin_unit.py:62 project/forms/event.py:109 -#: project/forms/organizer.py:35 project/templates/_macros.html:313 +#: project/forms/organizer.py:35 project/templates/_macros.html:317 msgid "Fax" msgstr "" @@ -519,7 +519,7 @@ msgstr "" msgid "Cancel deletion" msgstr "" -#: project/forms/admin_unit.py:158 project/templates/layout.html:305 +#: project/forms/admin_unit.py:158 project/templates/layout.html:308 #: project/templates/manage/delete_membership.html:6 msgid "Leave organization" msgstr "" @@ -653,20 +653,20 @@ msgid "" "days." msgstr "" -#: project/forms/event.py:50 project/templates/planing/list.html:75 +#: project/forms/event.py:50 msgid "All-day" msgstr "" -#: project/forms/event.py:54 project/templates/_macros.html:1769 +#: project/forms/event.py:54 project/templates/_macros.html:1773 #: project/templates/widget/event_suggestion/create.html:240 msgid "Recurring event" msgstr "" -#: project/forms/event.py:61 project/templates/_macros.html:1318 +#: project/forms/event.py:61 project/templates/_macros.html:1322 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:67 project/templates/_macros.html:1335 +#: project/forms/event.py:67 project/templates/_macros.html:1339 msgid "An event can last a maximum of 14 days." msgstr "" @@ -747,7 +747,7 @@ msgid "If the participants needs to register for the event." msgstr "" #: project/forms/event.py:170 project/templates/_macros.html:260 -#: project/templates/layout.html:115 +#: project/templates/layout.html:118 msgid "Booked up" msgstr "" @@ -803,11 +803,11 @@ msgstr "" msgid "EventAttendanceMode.offline" msgstr "" -#: project/forms/event.py:217 project/templates/layout.html:103 +#: project/forms/event.py:217 project/templates/layout.html:106 msgid "EventAttendanceMode.online" msgstr "" -#: project/forms/event.py:219 project/templates/layout.html:106 +#: project/forms/event.py:219 project/templates/layout.html:109 msgid "EventAttendanceMode.mixed" msgstr "" @@ -830,8 +830,8 @@ msgid "" " course it works without it." msgstr "" -#: project/forms/event.py:242 project/templates/_macros.html:418 -#: project/templates/_macros.html:581 +#: project/forms/event.py:242 project/templates/_macros.html:422 +#: project/templates/_macros.html:585 msgid "Previous start date" msgstr "" @@ -876,9 +876,9 @@ msgid "Invalid co-organizer." msgstr "" #: project/forms/event.py:286 project/forms/event.py:295 -#: project/forms/event.py:368 project/forms/event.py:442 -#: project/forms/event_suggestion.py:50 project/templates/_macros.html:458 -#: project/templates/_macros.html:624 project/templates/event/create.html:288 +#: project/forms/event.py:373 project/forms/event.py:450 +#: project/forms/event_suggestion.py:50 project/templates/_macros.html:462 +#: project/templates/_macros.html:628 project/templates/event/create.html:288 #: project/templates/event/update.html:170 #: project/templates/event_place/create.html:31 #: project/templates/event_place/delete.html:13 @@ -896,9 +896,9 @@ msgid "Enter new place" msgstr "" #: project/forms/event.py:302 project/forms/event.py:311 -#: project/forms/event.py:376 project/forms/event.py:439 +#: project/forms/event.py:381 project/forms/event.py:447 #: project/forms/event_date.py:40 project/forms/event_suggestion.py:60 -#: project/templates/_macros.html:495 project/templates/_macros.html:667 +#: project/templates/_macros.html:499 project/templates/_macros.html:671 #: project/templates/event/create.html:257 #: project/templates/event/update.html:160 #: project/templates/manage/events.html:104 @@ -921,110 +921,118 @@ msgid "Save as draft" msgstr "" #: project/forms/event.py:318 +msgid "Save as planned" +msgstr "" + +#: project/forms/event.py:319 msgid "Publish event" msgstr "" -#: project/forms/event.py:350 +#: project/forms/event.py:355 msgid "Select existing place or enter new place" msgstr "" -#: project/forms/event.py:358 +#: project/forms/event.py:363 msgid "Select existing organizer or enter new organizer" msgstr "" -#: project/forms/event.py:371 +#: project/forms/event.py:376 msgid "" "Choose where the event takes place. You can add and modify places at " "Organization > Places." msgstr "" -#: project/forms/event.py:379 +#: project/forms/event.py:384 msgid "" "Select the organizer. You can add and modify organizers at Organization >" " Organizers." msgstr "" -#: project/forms/event.py:385 project/templates/event/update.html:149 +#: project/forms/event.py:390 project/templates/event/update.html:149 #: project/templates/oauth2_token/list.html:21 msgid "Status" msgstr "" -#: project/forms/event.py:388 +#: project/forms/event.py:393 msgid "EventStatus.scheduled" msgstr "" -#: project/forms/event.py:389 project/templates/layout.html:69 -#: project/templates/layout.html:84 +#: project/forms/event.py:394 project/templates/layout.html:72 +#: project/templates/layout.html:87 msgid "EventStatus.cancelled" msgstr "" -#: project/forms/event.py:390 project/templates/layout.html:72 -#: project/templates/layout.html:87 +#: project/forms/event.py:395 project/templates/layout.html:75 +#: project/templates/layout.html:90 msgid "EventStatus.movedOnline" msgstr "" -#: project/forms/event.py:391 project/templates/layout.html:75 -#: project/templates/layout.html:90 +#: project/forms/event.py:396 project/templates/layout.html:78 +#: project/templates/layout.html:93 msgid "EventStatus.postponed" msgstr "" -#: project/forms/event.py:392 project/templates/layout.html:78 -#: project/templates/layout.html:93 +#: project/forms/event.py:397 project/templates/layout.html:81 +#: project/templates/layout.html:96 msgid "EventStatus.rescheduled" msgstr "" -#: project/forms/event.py:394 +#: project/forms/event.py:399 msgid "Select the status of the event." msgstr "" -#: project/forms/event.py:398 +#: project/forms/event.py:403 msgid "Public status" msgstr "" -#: project/forms/event.py:401 +#: project/forms/event.py:406 msgid "PublicStatus.published" msgstr "" -#: project/forms/event.py:402 project/templates/_macros.html:266 +#: project/forms/event.py:407 project/templates/_macros.html:269 +msgid "PublicStatus.planned" +msgstr "" + +#: project/forms/event.py:408 project/templates/_macros.html:267 msgid "PublicStatus.draft" msgstr "" -#: project/forms/event.py:404 -msgid "Select the public status of the event." +#: project/forms/event.py:410 project/templates/event/create.html:371 +msgid "Planned events appear in the scheduling view, but not on public calendars." msgstr "" -#: project/forms/event.py:407 project/templates/event/update.html:5 +#: project/forms/event.py:415 project/templates/event/update.html:5 #: project/templates/event/update.html:117 msgid "Update event" msgstr "" -#: project/forms/event.py:423 project/templates/_macros.html:1275 +#: project/forms/event.py:431 project/templates/_macros.html:1279 #: project/templates/event/actions.html:66 #: project/templates/event/delete.html:6 msgid "Delete event" msgstr "" -#: project/forms/event.py:430 project/forms/event_date.py:14 -#: project/forms/planing.py:14 +#: project/forms/event.py:438 project/forms/event_date.py:14 +#: project/forms/planning.py:21 msgid "From" msgstr "" -#: project/forms/event.py:432 project/forms/event_date.py:16 -#: project/forms/planing.py:16 +#: project/forms/event.py:440 project/forms/event_date.py:16 +#: project/forms/planning.py:22 msgid "to" msgstr "" -#: project/forms/event.py:434 project/forms/event_date.py:18 +#: project/forms/event.py:442 project/forms/event_date.py:18 msgid "Keyword" msgstr "" -#: project/forms/event.py:436 project/forms/event_date.py:20 -#: project/forms/planing.py:19 project/templates/_macros.html:391 +#: project/forms/event.py:444 project/forms/event_date.py:20 +#: project/forms/planning.py:24 project/templates/_macros.html:395 msgid "Category" msgstr "" -#: project/forms/event.py:446 project/forms/event_date.py:26 -#: project/forms/planing.py:22 project/templates/_macros.html:320 +#: project/forms/event.py:454 project/forms/event_date.py:26 +#: project/forms/planning.py:27 project/templates/_macros.html:324 #: project/templates/admin_unit/create.html:39 #: project/templates/admin_unit/update.html:47 #: project/templates/event_place/create.html:40 @@ -1036,28 +1044,29 @@ msgstr "" msgid "Location" msgstr "" -#: project/forms/event.py:448 project/forms/event_date.py:28 -#: project/forms/planing.py:24 +#: project/forms/event.py:456 project/forms/event_date.py:28 +#: project/forms/planning.py:29 msgid "Distance" msgstr "" -#: project/forms/event.py:455 project/forms/event_date.py:49 +#: project/forms/event.py:463 project/forms/event_date.py:49 +#: project/forms/planning.py:41 msgid "Exclude recurring events" msgstr "" -#: project/forms/event.py:459 project/forms/event_date.py:54 +#: project/forms/event.py:467 project/forms/event_date.py:54 msgid "Find events" msgstr "" #: project/forms/event_date.py:35 project/forms/reference.py:11 -#: project/forms/reference_request.py:16 project/templates/_macros.html:511 -#: project/templates/_macros.html:684 +#: project/forms/reference_request.py:16 project/templates/_macros.html:515 +#: project/templates/_macros.html:688 #: project/templates/admin/delete_admin_unit.html:13 #: project/templates/admin_unit/cancel_deletion.html:13 #: project/templates/admin_unit/create.html:28 #: project/templates/admin_unit/request_deletion.html:15 #: project/templates/admin_unit/update.html:36 -#: project/templates/layout.html:257 +#: project/templates/layout.html:260 #: project/templates/manage/delete_membership.html:13 #: project/templates/verification_request/delete.html:13 #: project/templates/verification_request/review.html:28 @@ -1068,7 +1077,7 @@ msgstr "" msgid "Show unreferenced events only" msgstr "" -#: project/forms/event_date.py:63 project/forms/planing.py:36 +#: project/forms/event_date.py:63 #: project/templates/widget/event_date/list.html:82 msgid "Find" msgstr "" @@ -1193,10 +1202,18 @@ msgstr "" msgid "Delete organizer" msgstr "" -#: project/forms/planing.py:30 +#: project/forms/planning.py:35 msgid "Weekdays" msgstr "" +#: project/forms/planning.py:46 +msgid "Min. expected number of participants" +msgstr "" + +#: project/forms/planning.py:50 project/templates/planning/list.html:98 +msgid "Refresh" +msgstr "" + #: project/forms/reference.py:22 msgid "Save reference" msgstr "" @@ -1222,7 +1239,7 @@ msgid "Delete request" msgstr "" #: project/forms/reference_request.py:28 -#: project/forms/verification_request.py:24 project/templates/_macros.html:1473 +#: project/forms/verification_request.py:24 project/templates/_macros.html:1477 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 #: project/templates/verification_request/review_status.html:4 @@ -1365,31 +1382,31 @@ msgstr "" msgid "Link" msgstr "" -#: project/templates/_macros.html:299 +#: project/templates/_macros.html:303 msgid "Verified" msgstr "" -#: project/templates/_macros.html:368 +#: project/templates/_macros.html:372 #, python-format msgid "Created at %(created_at)s by %(created_by)s." msgstr "" -#: project/templates/_macros.html:370 +#: project/templates/_macros.html:374 #, python-format msgid "Created at %(created_at)s." msgstr "" -#: project/templates/_macros.html:375 +#: project/templates/_macros.html:379 #, python-format msgid "Last updated at %(updated_at)s by %(updated_by)s." msgstr "" -#: project/templates/_macros.html:377 +#: project/templates/_macros.html:381 #, python-format msgid "Last updated at %(updated_at)s." msgstr "" -#: project/templates/_macros.html:407 project/templates/_macros.html:577 +#: project/templates/_macros.html:411 project/templates/_macros.html:581 #: project/templates/event/actions.html:25 #: project/templates/event/create.html:234 #: project/templates/event/update.html:126 @@ -1398,44 +1415,44 @@ msgstr "" msgid "Event" msgstr "" -#: project/templates/_macros.html:413 project/templates/_macros.html:999 +#: project/templates/_macros.html:417 project/templates/_macros.html:1003 msgid "Date" msgstr "" -#: project/templates/_macros.html:440 project/templates/_macros.html:599 -#: project/templates/_macros.html:1542 project/templates/event/actions.html:51 +#: project/templates/_macros.html:444 project/templates/_macros.html:603 +#: project/templates/_macros.html:1546 project/templates/event/actions.html:51 msgid "Share" msgstr "" -#: project/templates/_macros.html:444 project/templates/_macros.html:603 -#: project/templates/_macros.html:1572 +#: project/templates/_macros.html:448 project/templates/_macros.html:607 +#: project/templates/_macros.html:1576 msgid "Add to calendar" msgstr "" -#: project/templates/_macros.html:452 project/templates/_macros.html:617 +#: project/templates/_macros.html:456 project/templates/_macros.html:621 #: project/templates/event/report.html:4 msgid "Report event" msgstr "" -#: project/templates/_macros.html:479 project/templates/_macros.html:650 +#: project/templates/_macros.html:483 project/templates/_macros.html:654 msgid "Show directions" msgstr "" -#: project/templates/_macros.html:484 project/templates/_macros.html:642 +#: project/templates/_macros.html:488 project/templates/_macros.html:646 msgid "The event takes place online." msgstr "" -#: project/templates/_macros.html:486 project/templates/_macros.html:644 +#: project/templates/_macros.html:490 project/templates/_macros.html:648 msgid "The event takes place both offline and online." msgstr "" -#: project/templates/_macros.html:607 project/templates/layout.html:183 +#: project/templates/_macros.html:611 project/templates/layout.html:186 #: project/templates/user/favorite_events.html:4 msgid "Favorite events" msgstr "" -#: project/templates/_macros.html:610 project/templates/_macros.html:653 -#: project/templates/_macros.html:785 +#: project/templates/_macros.html:614 project/templates/_macros.html:657 +#: project/templates/_macros.html:789 #: project/templates/admin/admin_units.html:36 #: project/templates/admin/users.html:36 #: project/templates/manage/events.html:118 @@ -1448,11 +1465,11 @@ msgstr "" msgid "Edit" msgstr "" -#: project/templates/_macros.html:711 +#: project/templates/_macros.html:715 msgid "Referenced by" msgstr "" -#: project/templates/_macros.html:723 project/templates/_macros.html:1285 +#: project/templates/_macros.html:727 project/templates/_macros.html:1289 #: project/templates/event/actions.html:38 #: project/templates/event_date/list.html:251 #: project/templates/manage/events.html:125 @@ -1460,39 +1477,39 @@ msgstr "" msgid "Reference event" msgstr "" -#: project/templates/_macros.html:732 +#: project/templates/_macros.html:736 #: project/templates/manage/reference_requests_incoming.html:5 #: project/templates/manage/reference_requests_outgoing.html:5 msgid "Reference requests" msgstr "" -#: project/templates/_macros.html:743 project/templates/_macros.html:1282 +#: project/templates/_macros.html:747 project/templates/_macros.html:1286 #: project/templates/event/actions.html:32 #: project/templates/manage/events.html:123 msgid "Request reference" msgstr "" -#: project/templates/_macros.html:751 project/templates/event_date/list.html:6 +#: project/templates/_macros.html:755 project/templates/event_date/list.html:6 #: project/templates/event_date/list.html:461 #: project/templates/reference_request/review.html:32 msgid "Event Dates" msgstr "" -#: project/templates/_macros.html:849 +#: project/templates/_macros.html:853 msgid "Search location on Google" msgstr "" -#: project/templates/_macros.html:916 +#: project/templates/_macros.html:920 #, python-format msgid "%(count)d event dates" msgstr "" -#: project/templates/_macros.html:939 project/templates/_macros.html:941 +#: project/templates/_macros.html:943 project/templates/_macros.html:945 #: project/templates/event_date/list.html:510 msgid "First" msgstr "" -#: project/templates/_macros.html:944 project/templates/_macros.html:946 +#: project/templates/_macros.html:948 project/templates/_macros.html:950 #: project/templates/event_date/list.html:511 #: project/templates/widget/event_suggestion/create.html:193 #: project/templates/widget/event_suggestion/create.html:218 @@ -1503,12 +1520,12 @@ msgstr "" msgid "Previous" msgstr "" -#: project/templates/_macros.html:948 +#: project/templates/_macros.html:952 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "" -#: project/templates/_macros.html:950 project/templates/_macros.html:952 +#: project/templates/_macros.html:954 project/templates/_macros.html:956 #: project/templates/event_date/list.html:513 #: project/templates/widget/event_suggestion/create.html:194 #: project/templates/widget/event_suggestion/create.html:219 @@ -1518,98 +1535,98 @@ msgstr "" msgid "Next" msgstr "" -#: project/templates/_macros.html:955 project/templates/_macros.html:957 +#: project/templates/_macros.html:959 project/templates/_macros.html:961 #: project/templates/event_date/list.html:514 msgid "Last" msgstr "" -#: project/templates/_macros.html:1022 +#: project/templates/_macros.html:1026 msgid "Radius" msgstr "" -#: project/templates/_macros.html:1204 +#: project/templates/_macros.html:1208 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1225 +#: project/templates/_macros.html:1229 project/templates/planning/list.html:97 msgid "Close" msgstr "" -#: project/templates/_macros.html:1226 +#: project/templates/_macros.html:1230 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1238 +#: project/templates/_macros.html:1242 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1274 project/templates/event/actions.html:65 +#: project/templates/_macros.html:1278 project/templates/event/actions.html:65 #: project/templates/event/delete.html:12 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1278 project/templates/event/actions.html:58 +#: project/templates/_macros.html:1282 project/templates/event/actions.html:58 msgid "Duplicate event" msgstr "" -#: project/templates/_macros.html:1289 project/templates/event/actions.html:44 +#: project/templates/_macros.html:1293 project/templates/event/actions.html:44 #: project/templates/manage/events.html:129 msgid "Add to list" msgstr "" -#: project/templates/_macros.html:1292 project/templates/manage/events.html:132 +#: project/templates/_macros.html:1296 project/templates/manage/events.html:132 msgid "More" msgstr "" -#: project/templates/_macros.html:1339 +#: project/templates/_macros.html:1343 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "" -#: project/templates/_macros.html:1367 +#: project/templates/_macros.html:1371 #, python-format msgid "Just use %(term)s" msgstr "" -#: project/templates/_macros.html:1433 +#: project/templates/_macros.html:1437 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1551 +#: project/templates/_macros.html:1555 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1551 +#: project/templates/_macros.html:1555 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1581 +#: project/templates/_macros.html:1585 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1583 +#: project/templates/_macros.html:1587 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1584 +#: project/templates/_macros.html:1588 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1585 +#: project/templates/_macros.html:1589 msgid "Other calendar" msgstr "" -#: project/templates/_macros.html:1770 +#: project/templates/_macros.html:1774 msgid "Remove event date" msgstr "" -#: project/templates/_macros.html:1803 project/templates/event/create.html:180 +#: project/templates/_macros.html:1807 project/templates/event/create.html:180 #: project/templates/event/update.html:103 #: project/templates/event_date/list.html:446 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "" -#: project/templates/_macros.html:1831 +#: project/templates/_macros.html:1835 msgid "Enter list name" msgstr "" @@ -1617,10 +1634,11 @@ msgstr "" msgid "Manage" msgstr "" -#: project/templates/home.html:37 project/templates/layout.html:173 +#: project/templates/home.html:37 project/templates/layout.html:176 #: project/templates/manage/admin_units.html:28 #: project/templates/manage/verification_requests_outgoing.html:13 #: project/templates/manage/verification_requests_outgoing_create_select.html:13 +#: project/templates/planning/list.html:68 #: project/templates/security/login_user.html:21 #: project/templates/security/register_user.html:43 msgid "Docs" @@ -1630,7 +1648,7 @@ msgstr "" msgid "Features" msgstr "" -#: project/templates/layout.html:167 project/templates/layout.html:215 +#: project/templates/layout.html:170 project/templates/layout.html:218 #: project/templates/manage/events.html:6 #: project/templates/manage/events.html:54 #: project/templates/manage/events_vue.html:4 @@ -1640,18 +1658,18 @@ msgstr "" #: project/templates/admin/admin.html:19 #: project/templates/admin/admin_units.html:4 #: project/templates/admin/admin_units.html:11 -#: project/templates/layout.html:168 project/templates/layout.html:181 +#: project/templates/layout.html:171 project/templates/layout.html:184 #: project/templates/manage/admin_units.html:3 #: project/templates/manage/admin_units.html:26 #: project/templates/organization/main.html:4 msgid "Organizations" msgstr "" -#: project/templates/layout.html:169 -msgid "Planing" +#: project/templates/layout.html:172 +msgid "Planning" msgstr "" -#: project/templates/layout.html:182 project/templates/layout.html:294 +#: project/templates/layout.html:185 project/templates/layout.html:297 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1664,100 +1682,100 @@ msgstr "" #: project/templates/admin/email.html:65 #: project/templates/admin/newsletter.html:92 #: project/templates/admin/settings.html:10 -#: project/templates/admin/users.html:10 project/templates/layout.html:186 +#: project/templates/admin/users.html:10 project/templates/layout.html:189 msgid "Admin" msgstr "" -#: project/templates/layout.html:190 +#: project/templates/layout.html:193 msgid "Logout" msgstr "" -#: project/templates/layout.html:221 +#: project/templates/layout.html:224 msgid "Show events" msgstr "" #: project/templates/event/create.html:5 -#: project/templates/event/create.html:225 project/templates/layout.html:222 +#: project/templates/event/create.html:225 project/templates/layout.html:225 #: project/templates/manage/events.html:55 #: project/templates/manage/organizers.html:38 msgid "Create event" msgstr "" -#: project/templates/layout.html:223 +#: project/templates/layout.html:226 msgid "Import event" msgstr "" -#: project/templates/layout.html:225 +#: project/templates/layout.html:228 #: project/templates/manage/event_lists.html:4 msgid "Event lists" msgstr "" -#: project/templates/layout.html:228 +#: project/templates/layout.html:231 msgid "Review suggestions" msgstr "" -#: project/templates/layout.html:238 +#: project/templates/layout.html:241 #: project/templates/manage/references_incoming.html:5 #: project/templates/manage/references_outgoing.html:5 msgid "References" msgstr "" -#: project/templates/layout.html:244 +#: project/templates/layout.html:247 #: project/templates/manage/references_incoming.html:9 msgid "Incoming references" msgstr "" -#: project/templates/layout.html:245 +#: project/templates/layout.html:248 #: project/templates/manage/references_outgoing.html:9 msgid "Outgoing references" msgstr "" -#: project/templates/layout.html:247 +#: project/templates/layout.html:250 #: project/templates/manage/reference_requests_incoming.html:9 msgid "Incoming reference requests" msgstr "" -#: project/templates/layout.html:252 +#: project/templates/layout.html:255 #: project/templates/manage/reference_requests_outgoing.html:9 msgid "Outgoing reference requests" msgstr "" -#: project/templates/layout.html:264 +#: project/templates/layout.html:267 #: project/templates/manage/verification_requests_outgoing.html:5 #: project/templates/manage/verification_requests_outgoing.html:10 msgid "Outgoing verification requests" msgstr "" -#: project/templates/layout.html:268 project/templates/manage/organizers.html:5 +#: project/templates/layout.html:271 project/templates/manage/organizers.html:5 #: project/templates/manage/organizers.html:10 #: project/templates/organizer/main.html:4 msgid "Organizers" msgstr "" #: project/templates/event_place/list.html:3 -#: project/templates/event_place/list.html:7 project/templates/layout.html:269 +#: project/templates/event_place/list.html:7 project/templates/layout.html:272 #: project/templates/manage/places.html:5 #: project/templates/manage/places.html:10 msgid "Places" msgstr "" -#: project/templates/layout.html:271 project/templates/manage/members.html:5 +#: project/templates/layout.html:274 project/templates/manage/members.html:5 #: project/templates/manage/members.html:28 #: project/templates/verification_request/review.html:54 msgid "Members" msgstr "" -#: project/templates/layout.html:272 project/templates/manage/relations.html:4 +#: project/templates/layout.html:275 project/templates/manage/relations.html:4 msgid "Relations" msgstr "" -#: project/templates/layout.html:276 +#: project/templates/layout.html:279 #: project/templates/manage/verification_requests_incoming.html:5 #: project/templates/manage/verification_requests_incoming.html:9 msgid "Incoming verification requests" msgstr "" -#: project/templates/layout.html:284 +#: project/templates/layout.html:287 #: project/templates/manage/admin_units.html:17 #: project/templates/manage/organization_invitations.html:4 #: project/templates/user/organization_invitations.html:4 @@ -1769,33 +1787,33 @@ msgstr "" #: project/templates/admin/settings.html:11 #: project/templates/admin_unit/update.html:6 #: project/templates/admin_unit/update.html:30 -#: project/templates/layout.html:288 project/templates/manage/widgets.html:11 +#: project/templates/layout.html:291 project/templates/manage/widgets.html:11 #: project/templates/manage/widgets.html:15 project/templates/profile.html:32 msgid "Settings" msgstr "" -#: project/templates/layout.html:289 project/templates/manage/export.html:3 +#: project/templates/layout.html:292 project/templates/manage/export.html:3 #: project/templates/manage/export.html:63 msgid "Export" msgstr "" -#: project/templates/layout.html:291 +#: project/templates/layout.html:294 #: project/templates/manage/custom_widgets.html:13 msgid "Custom widgets" msgstr "" -#: project/templates/layout.html:292 project/templates/manage/reviews.html:10 +#: project/templates/layout.html:295 project/templates/manage/reviews.html:10 #: project/templates/manage/widgets.html:5 #: project/templates/manage/widgets.html:9 msgid "Widgets" msgstr "" -#: project/templates/layout.html:304 +#: project/templates/layout.html:307 msgid "Switch organization" msgstr "" #: project/templates/developer/read.html:4 -#: project/templates/developer/read.html:8 project/templates/layout.html:351 +#: project/templates/developer/read.html:8 project/templates/layout.html:354 #: project/templates/profile.html:45 msgid "Developer" msgstr "" @@ -2400,9 +2418,13 @@ msgstr "" msgid "Revoke" msgstr "" -#: project/templates/planing/list.html:5 -#: project/templates/planing/list.html:105 -msgid "Event Planing" +#: project/templates/planning/list.html:5 +#: project/templates/planning/list.html:66 +msgid "Event Planning" +msgstr "" + +#: project/templates/planning/list.html:76 +msgid "Filters" msgstr "" #: project/templates/reference/read.html:4 @@ -2616,19 +2638,23 @@ msgstr "" msgid "Draft successfully saved" msgstr "" -#: project/views/event.py:226 +#: project/views/event.py:185 +msgid "Event successfully planned" +msgstr "" + +#: project/views/event.py:228 msgid "Event successfully updated" msgstr "" -#: project/views/event.py:252 +#: project/views/event.py:254 msgid "Event successfully deleted" msgstr "" -#: project/views/event.py:417 +#: project/views/event.py:419 msgid "Referenced event changed" msgstr "" -#: project/views/event.py:440 +#: project/views/event.py:442 msgid "New event report" msgstr "" diff --git a/project/__init__.py b/project/__init__.py index 45318c3..e273a09 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -283,7 +283,7 @@ from project.views import ( oauth2_token, organization, organizer, - planing, + planning, reference, reference_request, reference_request_review, diff --git a/project/access.py b/project/access.py index 4880a41..11049f4 100644 --- a/project/access.py +++ b/project/access.py @@ -201,6 +201,16 @@ def can_create_admin_unit(): return any(admin_unit.can_create_other for admin_unit in admin_units) +def can_use_planning(): + if not current_user.is_authenticated: + return False + + if has_current_user_role("admin"): # pragma: no cover + return True + + return current_user.is_member_of_verified_admin_unit + + def can_verify_admin_unit(): if not current_user.is_authenticated: # pragma: no cover return False @@ -216,6 +226,13 @@ def can_read_event(event: Event) -> bool: if event.public_status == PublicStatus.published and event.admin_unit.is_verified: return True + if ( + event.public_status == PublicStatus.planned + and event.admin_unit.is_verified + and can_use_planning() + ): + return True + return has_access(event.admin_unit, "event:read") diff --git a/project/api/event_date/resources.py b/project/api/event_date/resources.py index d769f80..624855d 100644 --- a/project/api/event_date/resources.py +++ b/project/api/event_date/resources.py @@ -3,7 +3,7 @@ from flask_apispec import doc, marshal_with, use_kwargs from sqlalchemy import and_ from sqlalchemy.orm import defaultload, lazyload -from project.access import login_api_user +from project.access import can_use_planning, login_api_user from project.api import add_api_resource from project.api.event.resources import api_can_read_event_or_401 from project.api.event_date.schemas import ( @@ -64,6 +64,7 @@ class EventDateSearchResource(BaseResource): login_api_user() params = EventSearchParams() params.load_from_request() + params.can_read_planned_events = can_use_planning() if "not_referenced" in request.args: admin_unit = get_current_admin_unit_for_api() diff --git a/project/forms/event.py b/project/forms/event.py index a76865b..becf03f 100644 --- a/project/forms/event.py +++ b/project/forms/event.py @@ -315,6 +315,7 @@ class CreateEventForm(BaseEventForm): new_organizer = FormField(OrganizerForm, default=lambda: EventOrganizer()) submit_draft = SubmitField(lazy_gettext("Save as draft")) + submit_planned = SubmitField(lazy_gettext("Save as planned")) submit = SubmitField(lazy_gettext("Publish event")) def populate_obj(self, obj): @@ -338,7 +339,11 @@ class CreateEventForm(BaseEventForm): field.populate_obj(obj, name) obj.public_status = ( - PublicStatus.published if self.submit.data else PublicStatus.draft + PublicStatus.published + if self.submit.data + else PublicStatus.planned + if self.submit_planned.data + else PublicStatus.draft ) def validate(self, extra_validators=None): @@ -399,9 +404,12 @@ class UpdateEventForm(BaseEventForm): coerce=int, choices=[ (int(PublicStatus.published), lazy_gettext("PublicStatus.published")), + (int(PublicStatus.planned), lazy_gettext("PublicStatus.planned")), (int(PublicStatus.draft), lazy_gettext("PublicStatus.draft")), ], - description=lazy_gettext("Select the public status of the event."), + description=lazy_gettext( + "Planned events appear in the scheduling view, but not on public calendars." + ), ) submit = SubmitField(lazy_gettext("Update event")) diff --git a/project/forms/planing.py b/project/forms/planing.py deleted file mode 100644 index a7c8e3c..0000000 --- a/project/forms/planing.py +++ /dev/null @@ -1,36 +0,0 @@ -from flask_babel import lazy_gettext -from flask_wtf import FlaskForm -from wtforms import HiddenField, SelectField, SubmitField -from wtforms.validators import Optional - -from project.forms.common import distance_choices, weekday_choices -from project.forms.widgets import CustomDateField, MultiCheckboxField - - -class PlaningForm(FlaskForm): - class Meta: - csrf = False - - date_from = CustomDateField(lazy_gettext("From"), validators=[Optional()]) - date_to = CustomDateField( - lazy_gettext("to"), set_end_of_day=True, validators=[Optional()] - ) - category_id = SelectField( - lazy_gettext("Category"), validators=[Optional()], coerce=int - ) - coordinate = HiddenField(validators=[Optional()]) - location = SelectField(lazy_gettext("Location"), validators=[Optional()]) - distance = SelectField( - lazy_gettext("Distance"), - validators=[Optional()], - coerce=int, - choices=distance_choices, - ) - weekday = MultiCheckboxField( - lazy_gettext("Weekdays"), - validators=[Optional()], - coerce=int, - choices=weekday_choices, - ) - - submit = SubmitField(lazy_gettext("Find")) diff --git a/project/forms/planning.py b/project/forms/planning.py new file mode 100644 index 0000000..111fbe0 --- /dev/null +++ b/project/forms/planning.py @@ -0,0 +1,50 @@ +from flask_babel import lazy_gettext +from flask_wtf import FlaskForm +from wtforms import ( + BooleanField, + HiddenField, + IntegerField, + SelectField, + StringField, + SubmitField, +) +from wtforms.validators import Optional + +from project.forms.common import distance_choices, weekday_choices +from project.forms.widgets import MultiCheckboxField + + +class PlanningForm(FlaskForm): + class Meta: + csrf = False + + date_from = HiddenField(lazy_gettext("From"), validators=[Optional()]) + date_to = HiddenField(lazy_gettext("to"), validators=[Optional()]) + category_id = MultiCheckboxField( + lazy_gettext("Category"), validators=[Optional()], coerce=int + ) + coordinate = HiddenField(validators=[Optional()]) + location = SelectField(lazy_gettext("Location"), validators=[Optional()]) + distance = SelectField( + lazy_gettext("Distance"), + validators=[Optional()], + coerce=int, + choices=distance_choices, + ) + weekday = MultiCheckboxField( + lazy_gettext("Weekdays"), + validators=[Optional()], + coerce=int, + choices=weekday_choices, + ) + exclude_recurring = BooleanField( + lazy_gettext("Exclude recurring events"), + validators=[Optional()], + ) + postal_code = StringField(lazy_gettext("Postal code"), validators=[Optional()]) + expected_participants_min = IntegerField( + lazy_gettext("Min. expected number of participants"), + validators=[Optional()], + ) + + submit = SubmitField(lazy_gettext("Refresh")) diff --git a/project/models/event.py b/project/models/event.py index 2372984..5c259d5 100644 --- a/project/models/event.py +++ b/project/models/event.py @@ -26,6 +26,7 @@ class EventStatus(IntEnum): class PublicStatus(IntEnum): draft = 1 published = 2 + planned = 3 class Event(db.Model, TrackableMixin, EventMixin): diff --git a/project/models/user.py b/project/models/user.py index 0978bcd..0da92ed 100644 --- a/project/models/user.py +++ b/project/models/user.py @@ -66,6 +66,15 @@ class User(db.Model, UserMixin): created_at = deferred(Column(DateTime, default=datetime.datetime.utcnow)) deletion_requested_at = deferred(Column(DateTime, nullable=True)) + @property + def is_member_of_verified_admin_unit(self): + if not self.adminunitmembers: # pragma: no cover + return False + + return any( + m.adminunit and m.adminunit.is_verified for m in self.adminunitmembers + ) + def get_user_id(self): return self.id diff --git a/project/services/event.py b/project/services/event.py index 02b1056..bd6e4f0 100644 --- a/project/services/event.py +++ b/project/services/event.py @@ -88,6 +88,35 @@ def fill_event_filter(event_filter, params: EventSearchParams): stati = [params.status] event_filter = and_(event_filter, Event.status.in_(stati)) + if params.public_status: + if type(params.public_status) is list: + public_stati = params.public_status + else: # pragma: no cover + public_stati = [params.public_status] + else: + public_stati = [ + PublicStatus.published, + PublicStatus.draft, + ] + + if not params.can_read_private_events and PublicStatus.draft in public_stati: + public_stati.remove(PublicStatus.draft) + + if ( + not params.can_read_private_events + and not params.can_read_planned_events + and PublicStatus.planned in public_stati + ): + public_stati.remove(PublicStatus.planned) + + if not params.can_read_private_events or not params.admin_unit_id: + event_filter = and_( + event_filter, + AdminUnit.is_verified, + ) + + event_filter = and_(event_filter, Event.public_status.in_(public_stati)) + if params.event_list_id: if type(params.event_list_id) is list: event_list_ids = params.event_list_id @@ -154,6 +183,12 @@ def fill_event_filter(event_filter, params: EventSearchParams): ~Event.is_recurring, ) + if params.expected_participants_min: + event_filter = and_( + event_filter, + Event.expected_participants >= params.expected_participants_min, + ) + return event_filter @@ -178,19 +213,6 @@ def get_event_dates_query(params: EventSearchParams): ), ) - if not params.can_read_private_events: - event_filter = and_( - event_filter, - Event.public_status == PublicStatus.published, - AdminUnit.is_verified, - ) - else: - event_filter = and_( - event_filter, - Event.public_status == PublicStatus.published, - AdminUnit.is_verified, - ) - if params.date_from: date_filter = EventDate.start >= params.date_from @@ -340,19 +362,6 @@ def get_events_query(params: EventSearchParams): if params.admin_unit_id: event_filter = and_(event_filter, Event.admin_unit_id == params.admin_unit_id) - if not params.can_read_private_events: - event_filter = and_( - event_filter, - Event.public_status == PublicStatus.published, - AdminUnit.is_verified, - ) - else: - event_filter = and_( - event_filter, - Event.public_status == PublicStatus.published, - AdminUnit.is_verified, - ) - if params.date_from: date_filter = EventDate.start >= params.date_from diff --git a/project/services/event_search.py b/project/services/event_search.py index 4d74155..f461432 100644 --- a/project/services/event_search.py +++ b/project/services/event_search.py @@ -18,6 +18,7 @@ class EventSearchParams(object): self._coordinate = None self.admin_unit_id = None self.can_read_private_events = None + self.can_read_planned_events = None self.keyword = None self.latitude = None self.longitude = None @@ -29,10 +30,12 @@ class EventSearchParams(object): self.weekday = None self.sort = None self.status = None + self.public_status = None self.favored_by_user_id = None self.postal_code = None self.not_referenced_by_organization_id = None self.exclude_recurring = False + self.expected_participants_min = None @property def date_from(self): @@ -88,7 +91,7 @@ class EventSearchParams(object): self.date_from = today self.date_to = None - def set_planing_date_range(self): + def set_planning_date_range(self): today = get_today() self.date_from = today self.date_to = date_set_end_of_day(today + relativedelta(months=3)) @@ -126,6 +129,22 @@ class EventSearchParams(object): return result + def load_public_status_list_param(self): + public_stati = self.load_list_param("public_status") + + if public_stati is None: # pragma: no cover + return None + + from project.models import PublicStatus + + result = list() + + for public_status in public_stati: + if public_status in PublicStatus.__members__: + result.append(PublicStatus.__members__[public_status]) + + return result + def load_from_request(self): if "date_from" in request.args: self.date_from_str = request.args["date_from"] @@ -154,6 +173,9 @@ class EventSearchParams(object): if "event_place_id" in request.args: self.event_place_id = request.args["event_place_id"] + if "expected_participants_min" in request.args: + self.expected_participants_min = request.args["expected_participants_min"] + if "event_list_id" in request.args: self.event_list_id = self.load_list_param("event_list_id") @@ -172,5 +194,8 @@ class EventSearchParams(object): if "status" in request.args: self.status = self.load_status_list_param() + if "public_status" in request.args: + self.public_status = self.load_public_status_list_param() + if "exclude_recurring" in request.args: self.exclude_recurring = self.load_bool_param("exclude_recurring") diff --git a/project/static/vue/common/event-warning-pills.vue.js b/project/static/vue/common/event-warning-pills.vue.js index 8d28abb..2af251e 100644 --- a/project/static/vue/common/event-warning-pills.vue.js +++ b/project/static/vue/common/event-warning-pills.vue.js @@ -1,6 +1,10 @@ const EventWarningPills = { template: ` + + + + diff --git a/project/static/vue/events/import.vue.js b/project/static/vue/events/import.vue.js index b0fb5f1..6b7a378 100644 --- a/project/static/vue/events/import.vue.js +++ b/project/static/vue/events/import.vue.js @@ -11,6 +11,7 @@ const EventImport = { rules="required|url" /> {{ $t("comp.draft") }} + {{ $t("comp.planned") }} {{ $t("comp.published") }} @@ -28,6 +29,7 @@ const EventImport = { title: "Import event", url: "URL", published: "Publish event", + planned: "Save as planned", draft: "Save as draft", importError: "Unfortunately, no event could be imported from the URL.", }, @@ -37,6 +39,7 @@ const EventImport = { title: "Veranstaltung importieren", url: "URL", published: "Veranstaltung veröffentlichen", + planned: "Als geplant speichern", draft: "Als Entwurf speichern", importError: "Von der URL konnte leider keine Veranstaltung importiert werden." }, diff --git a/project/static/vue/planning/list.vue.js b/project/static/vue/planning/list.vue.js new file mode 100644 index 0000000..b549947 --- /dev/null +++ b/project/static/vue/planning/list.vue.js @@ -0,0 +1,278 @@ +const PlanningList = { + template: ` +
+ +
+ `, + i18n: { + messages: { + en: { + comp: { + countTitle: "{count} dates", + maxWarning: "The maximum number of dates was loaded. Shorten the time period or refine the search for better results.", + today: "Today", + day: "Day", + week: "Week", + month: "Month", + filter: "Filter", + }, + }, + de: { + comp: { + countTitle: "{count} Termine", + maxWarning: "Es wurde die maximale Anzahl an Terminen geladen. Verkürze den Zeitraum oder verfeinere die Suche für bessere Ergebnisse.", + today: "Heute", + day: "Tag", + week: "Woche", + month: "Monat", + filter: "Filter", + }, + }, + }, + }, + data: () => ({ + focus: '', + type: 'month', + title: "", + countTitle: "", + events: [], + selectedEvent: null, + selectedElement: null, + selectedOpen: false, + isLoading: false, + maxDates: 200, + warning: null, + }), + mounted () { + this.$refs.calendar.checkChange(); + }, + methods: { + parameterChanged() { + if (this.$refs.calendar) { + this.loadEvents(); + } + }, + calendarChanged({ start, end }) { + $('#date_from').val(start.date); + $('#date_to').val(end.date); + this.loadEvents(); + }, + loadEvents(page = 1) { + $('#page').val(page); + this.title = this.$refs.calendar.title; + + if (page == 1) { + this.events = []; + this.warning = null; + this.countTitle = ""; + } + const vm = this; + axios + .get(`/api/v1/event-dates/search?` + $("#filter_form").serialize(), { + withCredentials: true, + handleLoading: this.handleLoading, + }) + .then((response) => { + for (const date of response.data.items) { + vm.events.push({ + name: date.event.name, + start: moment(date.start).toDate(), + end: date.end != null ? moment(date.end).toDate() : null, + timed: !date.allday, + date: date, + color: vm.$root.event_has_status_info(date.event) ? '#17a2b8' : '#007bff' + }); + } + + const count = vm.events.length; + vm.countTitle = vm.$t('comp.countTitle', { count: count }); + vm.scrollToMinTime(); + + if (count >= vm.maxDates) { + vm.warning = vm.$t('comp.maxWarning'); + return; + } + + if (response.data.has_next) { + vm.loadEvents(response.data.next_num); + } + }); + }, + viewDay ({ date }) { + this.focus = date; + this.type = 'day'; + }, + setToday () { + this.focus = '' + }, + openFilter () { + $('#filterFormModal').modal('show'); + }, + getEventColor (event) { + return event.color; + }, + scrollToMinTime() { + if (!this.$refs.calendar) { + return; + } + + if (this.$refs.calendar.type == 'month') { + return; + } + + if (this.events.length < 1) { + return; + } + + const min_event = this.events.reduce(function(prev, curr) { + return prev.start.getHours() < curr.start.getHours() ? prev : curr; + }); + this.$refs.calendar.scrollToTime({ hour: min_event.start.getHours(), minute: 0 }); + }, + showEvent ({ nativeEvent, event }) { + const open = () => { + this.selectedEvent = event + this.selectedElement = nativeEvent.target + requestAnimationFrame(() => requestAnimationFrame(() => this.selectedOpen = true)) + } + + if (this.selectedOpen) { + this.selectedOpen = false + requestAnimationFrame(() => requestAnimationFrame(() => open())) + } else { + open() + } + + nativeEvent.stopPropagation() + }, + openEventDate(date) { + const url = `${axios.defaults.baseURL}/eventdate/${date.id}`; + window.open(url); + }, + handleLoading(isLoading) { + this.isLoading = isLoading; + }, + }, +}; diff --git a/project/templates/_macros.html b/project/templates/_macros.html index 291298a..acc1e45 100644 --- a/project/templates/_macros.html +++ b/project/templates/_macros.html @@ -262,8 +262,12 @@ {% endmacro %} {% macro render_public_status_pill(event) %} -{% if event.public_status and event.public_status == 1 %} - {{ _('PublicStatus.draft') }} +{% if event.public_status %} + {% if event.public_status == 1 %} + {{ _('PublicStatus.draft') }} + {% elif event.public_status == 3 %} + {{ _('PublicStatus.planned') }} + {% endif %} {% endif %} {% endmacro %} diff --git a/project/templates/event/create.html b/project/templates/event/create.html index e6bfd0f..a07a4f5 100644 --- a/project/templates/event/create.html +++ b/project/templates/event/create.html @@ -368,8 +368,11 @@ $( function() { {% endif %} +

{{ _('Planned events appear in the scheduling view, but not on public calendars.') }}

+
{{ form.submit(class="btn btn-primary m-1")|safe }} + {{ form.submit_planned(class="btn btn-secondary m-1")|safe }} {{ form.submit_draft(class="btn btn-secondary m-1")|safe }}
diff --git a/project/templates/event_date/list.html b/project/templates/event_date/list.html index 83cf4d4..067b956 100644 --- a/project/templates/event_date/list.html +++ b/project/templates/event_date/list.html @@ -488,9 +488,9 @@

- {{ form.submit(class="btn btn-primary")|safe }} - - + {{ form.submit(class="btn btn-primary mt-1 mr-1")|safe }} + +

diff --git a/project/templates/layout.html b/project/templates/layout.html index 0b13db4..3fc26dc 100644 --- a/project/templates/layout.html +++ b/project/templates/layout.html @@ -43,6 +43,9 @@ + {%- block styles_before %} + {%- endblock styles_before %} + @@ -166,7 +169,7 @@

- {{ form.submit(class="btn btn-primary")|safe }} - + {{ form.submit(class="btn btn-primary mt-1 mr-1")|safe }} +

@@ -103,8 +103,8 @@ var vue_app_data = { eventId: 0 }; {{ _('Event') }} {{ _('Organizer') }} {{ _('Place') }} - - + + @@ -138,8 +138,8 @@ var vue_app_data = { eventId: 0 };
{% if event.event_place.location %}{{ event.event_place.location.postalCode }} {{ event.event_place.location.city }}{% endif %}
- - {{ event.references|length }}/{{ event.reference_requests|length }} + + {{ event.references|length }}/{{ event.reference_requests|length }} {% endfor %} diff --git a/project/templates/manage/organizers.html b/project/templates/manage/organizers.html index 0655c30..2ca2df0 100644 --- a/project/templates/manage/organizers.html +++ b/project/templates/manage/organizers.html @@ -19,8 +19,8 @@ {{ _('Location') }} {{ _('Phone') }} {{ _('Email') }} / {{ _('Link URL') }} - - + + @@ -44,8 +44,8 @@
{{ organizer.email or '' }}
{{ organizer.url or '' }}
- - {{ organizer.events|length }} + + {{ organizer.events|length }} {% endfor %} diff --git a/project/templates/manage/places.html b/project/templates/manage/places.html index feaff82..0121c4f 100644 --- a/project/templates/manage/places.html +++ b/project/templates/manage/places.html @@ -17,9 +17,9 @@ {{ _('Name') }} {{ _('Location') }} - - - + + + @@ -35,9 +35,9 @@ {{ render_location(place.location) }} - - - {{ place.events|length }} + + + {{ place.events|length }} {% endfor %} diff --git a/project/templates/planing/list.html b/project/templates/planing/list.html deleted file mode 100644 index 6161b6f..0000000 --- a/project/templates/planing/list.html +++ /dev/null @@ -1,138 +0,0 @@ -{% extends "layout.html" %} -{% from "_macros.html" import render_form_styles, render_form_scripts, render_jquery_steps_header, render_field, render_field_with_errors, render_event_dates_date_field, render_event_dates_location_field, render_google_filter_autocomplete_header, render_pagination, render_place, render_events_sub_menu %} - -{%- block title -%} -{{ _('Event Planing') }} -{%- endblock -%} - -{% block content_container_attribs %}{% endblock %} - -{% block styles %} -{{ render_form_styles() }} -{% endblock %} - -{% block header_before_site_js %} -{{ render_form_scripts() }} -{%- endblock -%} - -{% block header %} -{{ render_jquery_steps_header() }} -{{ render_google_filter_autocomplete_header() }} -{% set max_events = 50 %} - -{% endblock %} -{% block content %} - -
-

{{ _('Event Planing') }}

-

Finde einen freien Termin im Kalender für deine Veranstaltung.

- -
-
- {{ form.hidden_tag() }} - {{ render_event_dates_location_field(form.location, form.distance) }} - {{ render_field_with_errors(form.category_id) }} - {{ render_event_dates_date_field(form.date_from, form.date_to) }} - {{ render_field_with_errors(form.weekday, ri="multicheckbox-inline") }} - {{ render_field(form.submit) }} -
-
-
- -
-
-
-
-
- - - -
-
-
- - -
-
- -{% endblock %} \ No newline at end of file diff --git a/project/templates/planning/list.html b/project/templates/planning/list.html new file mode 100644 index 0000000..5e4ea8f --- /dev/null +++ b/project/templates/planning/list.html @@ -0,0 +1,110 @@ +{% extends "layout_vue.html" %} +{% from "_macros.html" import render_form_styles, render_form_scripts, render_jquery_steps_header, render_field, render_field_with_errors, render_event_dates_date_field, render_event_dates_location_field, render_google_filter_autocomplete_header, render_pagination, render_place, render_events_sub_menu %} + +{%- block title -%} +{{ _('Event Planning') }} +{%- endblock -%} + +{%- block styles_before %} + + +{%- endblock styles_before %} + +{% block styles %} +{{ render_form_styles() }} + + +{% endblock %} + +{% block header_before_site_js %} +{{ super() }} +{{ render_form_scripts() }} +{%- endblock -%} + +{% block component_scripts %} + + +{% endblock %} + +{% block component_definitions %} +Vue.component("PlanningList", PlanningList); +{% endblock %} + +{% block vue_init_data %} +{{ super() }} +vue_init_data.vuetify = new Vuetify(); +{% endblock %} + +{% block vue_container %} +{% endblock %} + +{% block header %} +{{ render_jquery_steps_header() }} +{{ render_google_filter_autocomplete_header() }} + +{% endblock %} +{% block content %} + +

+ {{ _('Event Planning') }} + {% if config["DOCS_URL"] %} + {{ _('Docs') }} + {% endif %} +

+ + + +
+ +
+ + {{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/project/translations/de/LC_MESSAGES/messages.mo b/project/translations/de/LC_MESSAGES/messages.mo index 62e6261982f7e75ee3b41bfa6e413ab7455b4dfd..0d93f575da1860ff3f87fa89b0cec792357f6da5 100644 GIT binary patch delta 10091 zcmYM&2YgjU+Q;z&q<07b5=e3*2_=LOf=EX|I-y7rq^H~z2p3FlsKPM_h!6q6Pz7nC zfT9pVMFo9vT>)2@MMYKt1zEwqf~&BW_xI1t`+4`{`kk3GXXcq_W=>-EU#ffda$Wag zgMey>|Bb2ZIL+|w2CDu4|4P#wCzI+7?21p?`ZHPa z2I4Uc!naM`bxuMB+3I!MR8urxJs4KPrG4)QVq4{&7CyU-zTa#&L+* z8IM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pLQE?0(CF$ssbxO-Qx`yf}f!JpT#`Dt2Ngh9)EUS^ zUDG^tGbof$(DgWuL3kD;@v8MtYs7k!p_ZrtN1(PM*E+?v&qAesJ}SUvw*ERQ16wc# z_pc}aIwa?5&_F+1e@8{=x54avBh((IVO`8bosrR~Et`fVxDk^vd87INf^#s5`W95i zjv+s(ou9Ea&e-Id)46Mt`PZpSID!XL-!OlZIfWgm{};Pr$Ia%ic0nd@2_EV4BcS@NXIzpgHQ{39%FD3a#&qw3x)bLe1N)Em$4cKy=4Z7Kt$W|f2@QP0)=X}<&=b^tuCJ%GbFJ#0 z<5_R{dOq$o$;*@3XSkPVXWtTU&*S~~R*9N2eRRS2F>!@Oql%^%#!b$PE6UG}%bk%s zsmOCRKzbx3LB`8+o_!jm&6)7!JL_&0yg-82=H*E(-QwlBS~k+h cGqn7^cfiN{^781+nE7k^tgq+ES|1qpKTY-oegFUf diff --git a/project/translations/de/LC_MESSAGES/messages.po b/project/translations/de/LC_MESSAGES/messages.po index 15551d9..b8259bf 100644 --- a/project/translations/de/LC_MESSAGES/messages.po +++ b/project/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: 2023-06-02 12:16+0200\n" +"POT-Creation-Date: 2023-06-09 13:32+0200\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -203,24 +203,24 @@ msgstr "message" msgid "You have received an invitation" msgstr "Du hast eine Einladung erhalten" -#: project/forms/admin.py:11 project/templates/layout.html:334 +#: project/forms/admin.py:11 project/templates/layout.html:337 #: project/views/root.py:55 msgid "Terms of service" msgstr "Nutzungsbedingungen" -#: project/forms/admin.py:12 project/templates/layout.html:339 +#: project/forms/admin.py:12 project/templates/layout.html:342 #: project/views/root.py:67 msgid "Legal notice" msgstr "Impressum" -#: project/forms/admin.py:13 project/templates/_macros.html:1461 -#: project/templates/layout.html:343 +#: project/forms/admin.py:13 project/templates/_macros.html:1465 +#: project/templates/layout.html:346 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:83 project/views/root.py:75 msgid "Contact" msgstr "Kontakt" -#: project/forms/admin.py:14 project/templates/layout.html:347 +#: project/forms/admin.py:14 project/templates/layout.html:350 #: project/views/root.py:83 msgid "Privacy" msgstr "Datenschutz" @@ -261,7 +261,7 @@ msgstr "Nutzer löschen" #: project/forms/admin_unit_member.py:30 project/forms/event.py:107 #: project/forms/event_suggestion.py:38 project/forms/organizer.py:33 #: project/forms/user.py:18 project/forms/user.py:23 -#: project/templates/_macros.html:246 project/templates/_macros.html:1557 +#: project/templates/_macros.html:246 project/templates/_macros.html:1561 #: project/templates/admin/admin.html:27 project/templates/admin/email.html:4 #: project/templates/admin/email.html:66 project/templates/admin/users.html:19 #: project/templates/manage/organizers.html:21 @@ -374,9 +374,9 @@ msgstr "Newsletter senden" msgid "Street" msgstr "Straße" -#: project/forms/admin_unit.py:18 project/forms/event.py:453 +#: project/forms/admin_unit.py:18 project/forms/event.py:461 #: project/forms/event_date.py:52 project/forms/event_place.py:16 -#: project/forms/organizer.py:16 +#: project/forms/organizer.py:16 project/forms/planning.py:44 msgid "Postal code" msgstr "Postleitzahl" @@ -419,7 +419,7 @@ msgstr "" "eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern " "und Unterstriche enthalten." -#: project/forms/admin_unit.py:48 project/templates/_macros.html:1599 +#: project/forms/admin_unit.py:48 project/templates/_macros.html:1603 msgid "Short name must contain only letters numbers or underscore" msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" @@ -440,13 +440,13 @@ msgstr "Link URL" #: project/forms/admin_unit.py:61 project/forms/event.py:108 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:34 -#: project/templates/_macros.html:305 +#: project/templates/_macros.html:309 #: project/templates/manage/organizers.html:20 msgid "Phone" msgstr "Telefon" #: project/forms/admin_unit.py:62 project/forms/event.py:109 -#: project/forms/organizer.py:35 project/templates/_macros.html:313 +#: project/forms/organizer.py:35 project/templates/_macros.html:317 msgid "Fax" msgstr "Fax" @@ -539,7 +539,7 @@ msgstr "Löschung beantragen" msgid "Cancel deletion" msgstr "Löschen abbrechen" -#: project/forms/admin_unit.py:158 project/templates/layout.html:305 +#: project/forms/admin_unit.py:158 project/templates/layout.html:308 #: project/templates/manage/delete_membership.html:6 msgid "Leave organization" msgstr "Organisation verlassen" @@ -678,20 +678,20 @@ msgid "" "days." msgstr "Gib an, wann der Termin endet. Ein Termin darf maximal 14 Tage dauern." -#: project/forms/event.py:50 project/templates/planing/list.html:75 +#: project/forms/event.py:50 msgid "All-day" msgstr "Ganztägig" -#: project/forms/event.py:54 project/templates/_macros.html:1769 +#: project/forms/event.py:54 project/templates/_macros.html:1773 #: project/templates/widget/event_suggestion/create.html:240 msgid "Recurring event" msgstr "Serientermin" -#: project/forms/event.py:61 project/templates/_macros.html:1318 +#: project/forms/event.py:61 project/templates/_macros.html:1322 msgid "The start must be before the end." msgstr "Der Start muss vor dem Ende sein." -#: project/forms/event.py:67 project/templates/_macros.html:1335 +#: project/forms/event.py:67 project/templates/_macros.html:1339 msgid "An event can last a maximum of 14 days." msgstr "Eine Veranstaltung darf maximal 14 Tage dauern." @@ -777,7 +777,7 @@ msgid "If the participants needs to register for the event." msgstr "Wenn sich die Teilnehmer für die Veranstaltung anmelden müssen." #: project/forms/event.py:170 project/templates/_macros.html:260 -#: project/templates/layout.html:115 +#: project/templates/layout.html:118 msgid "Booked up" msgstr "Ausgebucht" @@ -837,11 +837,11 @@ msgstr "Teilnahme" msgid "EventAttendanceMode.offline" msgstr "Präsenzveranstaltung" -#: project/forms/event.py:217 project/templates/layout.html:103 +#: project/forms/event.py:217 project/templates/layout.html:106 msgid "EventAttendanceMode.online" msgstr "Online" -#: project/forms/event.py:219 project/templates/layout.html:106 +#: project/forms/event.py:219 project/templates/layout.html:109 msgid "EventAttendanceMode.mixed" msgstr "Präsenzveranstaltung und online" @@ -866,8 +866,8 @@ msgstr "" "Wir empfehlen dir, ein Foto für die Veranstaltung hochzuladen. Es macht " "schon deutlich mehr her, aber es geht natürlich auch ohne." -#: project/forms/event.py:242 project/templates/_macros.html:418 -#: project/templates/_macros.html:581 +#: project/forms/event.py:242 project/templates/_macros.html:422 +#: project/templates/_macros.html:585 msgid "Previous start date" msgstr "Vorheriges Startdatum" @@ -918,9 +918,9 @@ msgid "Invalid co-organizer." msgstr "Ungültiger Mitveranstalter." #: project/forms/event.py:286 project/forms/event.py:295 -#: project/forms/event.py:368 project/forms/event.py:442 -#: project/forms/event_suggestion.py:50 project/templates/_macros.html:458 -#: project/templates/_macros.html:624 project/templates/event/create.html:288 +#: project/forms/event.py:373 project/forms/event.py:450 +#: project/forms/event_suggestion.py:50 project/templates/_macros.html:462 +#: project/templates/_macros.html:628 project/templates/event/create.html:288 #: project/templates/event/update.html:170 #: project/templates/event_place/create.html:31 #: project/templates/event_place/delete.html:13 @@ -938,9 +938,9 @@ msgid "Enter new place" msgstr "Neuen Ort eingeben" #: project/forms/event.py:302 project/forms/event.py:311 -#: project/forms/event.py:376 project/forms/event.py:439 +#: project/forms/event.py:381 project/forms/event.py:447 #: project/forms/event_date.py:40 project/forms/event_suggestion.py:60 -#: project/templates/_macros.html:495 project/templates/_macros.html:667 +#: project/templates/_macros.html:499 project/templates/_macros.html:671 #: project/templates/event/create.html:257 #: project/templates/event/update.html:160 #: project/templates/manage/events.html:104 @@ -963,18 +963,22 @@ msgid "Save as draft" msgstr "Als Entwurf speichern" #: project/forms/event.py:318 +msgid "Save as planned" +msgstr "Als geplant speichern" + +#: project/forms/event.py:319 msgid "Publish event" msgstr "Veranstaltung veröffentlichen" -#: project/forms/event.py:350 +#: project/forms/event.py:355 msgid "Select existing place or enter new place" msgstr "Existierenden Ort wählen oder neuen Ort eingeben" -#: project/forms/event.py:358 +#: project/forms/event.py:363 msgid "Select existing organizer or enter new organizer" msgstr "Wähle einen vorhandenen Veranstalter oder gib einen neuen Veranstalter ein" -#: project/forms/event.py:371 +#: project/forms/event.py:376 msgid "" "Choose where the event takes place. You can add and modify places at " "Organization > Places." @@ -982,7 +986,7 @@ msgstr "" "Wähle, wo die Veranstaltung stattfindet. Du kannst Orte unter " "Organisation > Orte hinzufügen und ändern." -#: project/forms/event.py:379 +#: project/forms/event.py:384 msgid "" "Select the organizer. You can add and modify organizers at Organization >" " Organizers." @@ -990,87 +994,93 @@ msgstr "" "Wähle den Veranstalter. Du kannst Veranstalter unter Organisation > " "Veranstalter hinzufügen und ändern." -#: project/forms/event.py:385 project/templates/event/update.html:149 +#: project/forms/event.py:390 project/templates/event/update.html:149 #: project/templates/oauth2_token/list.html:21 msgid "Status" msgstr "Status" -#: project/forms/event.py:388 +#: project/forms/event.py:393 msgid "EventStatus.scheduled" msgstr "Geplant" -#: project/forms/event.py:389 project/templates/layout.html:69 -#: project/templates/layout.html:84 +#: project/forms/event.py:394 project/templates/layout.html:72 +#: project/templates/layout.html:87 msgid "EventStatus.cancelled" msgstr "Abgesagt" -#: project/forms/event.py:390 project/templates/layout.html:72 -#: project/templates/layout.html:87 +#: project/forms/event.py:395 project/templates/layout.html:75 +#: project/templates/layout.html:90 msgid "EventStatus.movedOnline" msgstr "Online verschoben" -#: project/forms/event.py:391 project/templates/layout.html:75 -#: project/templates/layout.html:90 +#: project/forms/event.py:396 project/templates/layout.html:78 +#: project/templates/layout.html:93 msgid "EventStatus.postponed" msgstr "Verschoben" -#: project/forms/event.py:392 project/templates/layout.html:78 -#: project/templates/layout.html:93 +#: project/forms/event.py:397 project/templates/layout.html:81 +#: project/templates/layout.html:96 msgid "EventStatus.rescheduled" msgstr "Neu angesetzt" -#: project/forms/event.py:394 +#: project/forms/event.py:399 msgid "Select the status of the event." msgstr "Wähle den Status der Veranstaltung." -#: project/forms/event.py:398 +#: project/forms/event.py:403 msgid "Public status" msgstr "Öffentlicher Status" -#: project/forms/event.py:401 +#: project/forms/event.py:406 msgid "PublicStatus.published" msgstr "Veröffentlicht" -#: project/forms/event.py:402 project/templates/_macros.html:266 +#: project/forms/event.py:407 project/templates/_macros.html:269 +msgid "PublicStatus.planned" +msgstr "In Planung" + +#: project/forms/event.py:408 project/templates/_macros.html:267 msgid "PublicStatus.draft" msgstr "Entwurf" -#: project/forms/event.py:404 -msgid "Select the public status of the event." -msgstr "Wähle den öffentlichen Status der Veranstaltung." +#: project/forms/event.py:410 project/templates/event/create.html:371 +msgid "Planned events appear in the scheduling view, but not on public calendars." +msgstr "" +"Geplante Veranstaltungen werden in der Planungsansicht angezeigt, aber " +"nicht in öffentlichen Kalendern." -#: project/forms/event.py:407 project/templates/event/update.html:5 +#: project/forms/event.py:415 project/templates/event/update.html:5 #: project/templates/event/update.html:117 msgid "Update event" msgstr "Veranstaltung aktualisieren" -#: project/forms/event.py:423 project/templates/_macros.html:1275 +#: project/forms/event.py:431 project/templates/_macros.html:1279 #: project/templates/event/actions.html:66 #: project/templates/event/delete.html:6 msgid "Delete event" msgstr "Veranstaltung löschen" -#: project/forms/event.py:430 project/forms/event_date.py:14 -#: project/forms/planing.py:14 +#: project/forms/event.py:438 project/forms/event_date.py:14 +#: project/forms/planning.py:21 msgid "From" msgstr "Von" -#: project/forms/event.py:432 project/forms/event_date.py:16 -#: project/forms/planing.py:16 +#: project/forms/event.py:440 project/forms/event_date.py:16 +#: project/forms/planning.py:22 msgid "to" msgstr "bis" -#: project/forms/event.py:434 project/forms/event_date.py:18 +#: project/forms/event.py:442 project/forms/event_date.py:18 msgid "Keyword" msgstr "Stichwort" -#: project/forms/event.py:436 project/forms/event_date.py:20 -#: project/forms/planing.py:19 project/templates/_macros.html:391 +#: project/forms/event.py:444 project/forms/event_date.py:20 +#: project/forms/planning.py:24 project/templates/_macros.html:395 msgid "Category" msgstr "Kategorie" -#: project/forms/event.py:446 project/forms/event_date.py:26 -#: project/forms/planing.py:22 project/templates/_macros.html:320 +#: project/forms/event.py:454 project/forms/event_date.py:26 +#: project/forms/planning.py:27 project/templates/_macros.html:324 #: project/templates/admin_unit/create.html:39 #: project/templates/admin_unit/update.html:47 #: project/templates/event_place/create.html:40 @@ -1082,28 +1092,29 @@ msgstr "Kategorie" msgid "Location" msgstr "Standort" -#: project/forms/event.py:448 project/forms/event_date.py:28 -#: project/forms/planing.py:24 +#: project/forms/event.py:456 project/forms/event_date.py:28 +#: project/forms/planning.py:29 msgid "Distance" msgstr "Distanz" -#: project/forms/event.py:455 project/forms/event_date.py:49 +#: project/forms/event.py:463 project/forms/event_date.py:49 +#: project/forms/planning.py:41 msgid "Exclude recurring events" msgstr "Serientermine nicht anzeigen" -#: project/forms/event.py:459 project/forms/event_date.py:54 +#: project/forms/event.py:467 project/forms/event_date.py:54 msgid "Find events" msgstr "Veranstaltungen finden" #: project/forms/event_date.py:35 project/forms/reference.py:11 -#: project/forms/reference_request.py:16 project/templates/_macros.html:511 -#: project/templates/_macros.html:684 +#: project/forms/reference_request.py:16 project/templates/_macros.html:515 +#: project/templates/_macros.html:688 #: project/templates/admin/delete_admin_unit.html:13 #: project/templates/admin_unit/cancel_deletion.html:13 #: project/templates/admin_unit/create.html:28 #: project/templates/admin_unit/request_deletion.html:15 #: project/templates/admin_unit/update.html:36 -#: project/templates/layout.html:257 +#: project/templates/layout.html:260 #: project/templates/manage/delete_membership.html:13 #: project/templates/verification_request/delete.html:13 #: project/templates/verification_request/review.html:28 @@ -1114,7 +1125,7 @@ msgstr "Organisation" msgid "Show unreferenced events only" msgstr "Nur nicht empfohlene Veranstaltungen anzeigen" -#: project/forms/event_date.py:63 project/forms/planing.py:36 +#: project/forms/event_date.py:63 #: project/templates/widget/event_date/list.html:82 msgid "Find" msgstr "Finden" @@ -1243,10 +1254,18 @@ msgstr "Veranstalter aktualisieren" msgid "Delete organizer" msgstr "Veranstalter löschen" -#: project/forms/planing.py:30 +#: project/forms/planning.py:35 msgid "Weekdays" msgstr "Wochentage" +#: project/forms/planning.py:46 +msgid "Min. expected number of participants" +msgstr "Mind. erwartete Teilnehmerzahl" + +#: project/forms/planning.py:50 project/templates/planning/list.html:98 +msgid "Refresh" +msgstr "Aktualisieren" + #: project/forms/reference.py:22 msgid "Save reference" msgstr "Empfehlung speichern" @@ -1272,7 +1291,7 @@ msgid "Delete request" msgstr "Anfrage löschen" #: project/forms/reference_request.py:28 -#: project/forms/verification_request.py:24 project/templates/_macros.html:1473 +#: project/forms/verification_request.py:24 project/templates/_macros.html:1477 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 #: project/templates/verification_request/review_status.html:4 @@ -1422,31 +1441,31 @@ msgstr "Auf Google Maps anzeigen" msgid "Link" msgstr "Link" -#: project/templates/_macros.html:299 +#: project/templates/_macros.html:303 msgid "Verified" msgstr "Verifiziert" -#: project/templates/_macros.html:368 +#: project/templates/_macros.html:372 #, python-format msgid "Created at %(created_at)s by %(created_by)s." msgstr "Erstellt am %(created_at)s von %(created_by)s." -#: project/templates/_macros.html:370 +#: project/templates/_macros.html:374 #, python-format msgid "Created at %(created_at)s." msgstr "Erstellt am %(created_at)s." -#: project/templates/_macros.html:375 +#: project/templates/_macros.html:379 #, python-format msgid "Last updated at %(updated_at)s by %(updated_by)s." msgstr "Zuletzt aktualisiert am %(updated_at)s von %(updated_by)s." -#: project/templates/_macros.html:377 +#: project/templates/_macros.html:381 #, python-format msgid "Last updated at %(updated_at)s." msgstr "Zuletzt aktualisiert am %(updated_at)s." -#: project/templates/_macros.html:407 project/templates/_macros.html:577 +#: project/templates/_macros.html:411 project/templates/_macros.html:581 #: project/templates/event/actions.html:25 #: project/templates/event/create.html:234 #: project/templates/event/update.html:126 @@ -1455,46 +1474,46 @@ msgstr "Zuletzt aktualisiert am %(updated_at)s." msgid "Event" msgstr "Veranstaltung" -#: project/templates/_macros.html:413 project/templates/_macros.html:999 +#: project/templates/_macros.html:417 project/templates/_macros.html:1003 msgid "Date" msgstr "Datum" -#: project/templates/_macros.html:440 project/templates/_macros.html:599 -#: project/templates/_macros.html:1542 project/templates/event/actions.html:51 +#: project/templates/_macros.html:444 project/templates/_macros.html:603 +#: project/templates/_macros.html:1546 project/templates/event/actions.html:51 msgid "Share" msgstr "Teilen" -#: project/templates/_macros.html:444 project/templates/_macros.html:603 -#: project/templates/_macros.html:1572 +#: project/templates/_macros.html:448 project/templates/_macros.html:607 +#: project/templates/_macros.html:1576 msgid "Add to calendar" msgstr "Zum Kalender" -#: project/templates/_macros.html:452 project/templates/_macros.html:617 +#: project/templates/_macros.html:456 project/templates/_macros.html:621 #: project/templates/event/report.html:4 msgid "Report event" msgstr "Veranstaltung melden" -#: project/templates/_macros.html:479 project/templates/_macros.html:650 +#: project/templates/_macros.html:483 project/templates/_macros.html:654 msgid "Show directions" msgstr "Anreise planen" -#: project/templates/_macros.html:484 project/templates/_macros.html:642 +#: project/templates/_macros.html:488 project/templates/_macros.html:646 msgid "The event takes place online." msgstr "Die Veranstaltung findet online statt." -#: project/templates/_macros.html:486 project/templates/_macros.html:644 +#: project/templates/_macros.html:490 project/templates/_macros.html:648 msgid "The event takes place both offline and online." msgstr "" "Die Veranstaltung findet sowohl als Präsenzveranstaltung als auch online " "statt." -#: project/templates/_macros.html:607 project/templates/layout.html:183 +#: project/templates/_macros.html:611 project/templates/layout.html:186 #: project/templates/user/favorite_events.html:4 msgid "Favorite events" msgstr "Merkzettel" -#: project/templates/_macros.html:610 project/templates/_macros.html:653 -#: project/templates/_macros.html:785 +#: project/templates/_macros.html:614 project/templates/_macros.html:657 +#: project/templates/_macros.html:789 #: project/templates/admin/admin_units.html:36 #: project/templates/admin/users.html:36 #: project/templates/manage/events.html:118 @@ -1507,11 +1526,11 @@ msgstr "Merkzettel" msgid "Edit" msgstr "Bearbeiten" -#: project/templates/_macros.html:711 +#: project/templates/_macros.html:715 msgid "Referenced by" msgstr "Empfohlen von" -#: project/templates/_macros.html:723 project/templates/_macros.html:1285 +#: project/templates/_macros.html:727 project/templates/_macros.html:1289 #: project/templates/event/actions.html:38 #: project/templates/event_date/list.html:251 #: project/templates/manage/events.html:125 @@ -1519,39 +1538,39 @@ msgstr "Empfohlen von" msgid "Reference event" msgstr "Veranstaltung empfehlen" -#: project/templates/_macros.html:732 +#: project/templates/_macros.html:736 #: project/templates/manage/reference_requests_incoming.html:5 #: project/templates/manage/reference_requests_outgoing.html:5 msgid "Reference requests" msgstr "Empfehlungsanfragen" -#: project/templates/_macros.html:743 project/templates/_macros.html:1282 +#: project/templates/_macros.html:747 project/templates/_macros.html:1286 #: project/templates/event/actions.html:32 #: project/templates/manage/events.html:123 msgid "Request reference" msgstr "Empfehlung anfragen" -#: project/templates/_macros.html:751 project/templates/event_date/list.html:6 +#: project/templates/_macros.html:755 project/templates/event_date/list.html:6 #: project/templates/event_date/list.html:461 #: project/templates/reference_request/review.html:32 msgid "Event Dates" msgstr "Termine" -#: project/templates/_macros.html:849 +#: project/templates/_macros.html:853 msgid "Search location on Google" msgstr "Ort bei Google suchen" -#: project/templates/_macros.html:916 +#: project/templates/_macros.html:920 #, python-format msgid "%(count)d event dates" msgstr "%(count)d Termine" -#: project/templates/_macros.html:939 project/templates/_macros.html:941 +#: project/templates/_macros.html:943 project/templates/_macros.html:945 #: project/templates/event_date/list.html:510 msgid "First" msgstr "Letzte" -#: project/templates/_macros.html:944 project/templates/_macros.html:946 +#: project/templates/_macros.html:948 project/templates/_macros.html:950 #: project/templates/event_date/list.html:511 #: project/templates/widget/event_suggestion/create.html:193 #: project/templates/widget/event_suggestion/create.html:218 @@ -1562,12 +1581,12 @@ msgstr "Letzte" msgid "Previous" msgstr "Zurück" -#: project/templates/_macros.html:948 +#: project/templates/_macros.html:952 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "Seite %(page)d von %(pages)d (%(total)d insgesamt)" -#: project/templates/_macros.html:950 project/templates/_macros.html:952 +#: project/templates/_macros.html:954 project/templates/_macros.html:956 #: project/templates/event_date/list.html:513 #: project/templates/widget/event_suggestion/create.html:194 #: project/templates/widget/event_suggestion/create.html:219 @@ -1577,98 +1596,98 @@ msgstr "Seite %(page)d von %(pages)d (%(total)d insgesamt)" msgid "Next" msgstr "Weiter" -#: project/templates/_macros.html:955 project/templates/_macros.html:957 +#: project/templates/_macros.html:959 project/templates/_macros.html:961 #: project/templates/event_date/list.html:514 msgid "Last" msgstr "Erste" -#: project/templates/_macros.html:1022 +#: project/templates/_macros.html:1026 msgid "Radius" msgstr "Umkreis" -#: project/templates/_macros.html:1204 +#: project/templates/_macros.html:1208 msgid "Edit image" msgstr "Bild bearbeiten" -#: project/templates/_macros.html:1225 +#: project/templates/_macros.html:1229 project/templates/planning/list.html:97 msgid "Close" msgstr "Schließen" -#: project/templates/_macros.html:1226 +#: project/templates/_macros.html:1230 msgid "Okay" msgstr "OK" -#: project/templates/_macros.html:1238 +#: project/templates/_macros.html:1242 msgid "Choose image file" msgstr "Bild-Datei auswählen" -#: project/templates/_macros.html:1274 project/templates/event/actions.html:65 +#: project/templates/_macros.html:1278 project/templates/event/actions.html:65 #: project/templates/event/delete.html:12 msgid "Edit event" msgstr "Veranstaltung bearbeiten" -#: project/templates/_macros.html:1278 project/templates/event/actions.html:58 +#: project/templates/_macros.html:1282 project/templates/event/actions.html:58 msgid "Duplicate event" msgstr "Veranstaltung duplizieren" -#: project/templates/_macros.html:1289 project/templates/event/actions.html:44 +#: project/templates/_macros.html:1293 project/templates/event/actions.html:44 #: project/templates/manage/events.html:129 msgid "Add to list" msgstr "Zu Liste hinzufügen" -#: project/templates/_macros.html:1292 project/templates/manage/events.html:132 +#: project/templates/_macros.html:1296 project/templates/manage/events.html:132 msgid "More" msgstr "Mehr" -#: project/templates/_macros.html:1339 +#: project/templates/_macros.html:1343 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "Bitte gib eine gültige Uhrzeit zwischen 00:00 und 23:59 ein." -#: project/templates/_macros.html:1367 +#: project/templates/_macros.html:1371 #, python-format msgid "Just use %(term)s" msgstr "Verwende einfach %(term)s" -#: project/templates/_macros.html:1433 +#: project/templates/_macros.html:1437 msgid "Event suggestion" msgstr "Veranstaltungsvorschlag" -#: project/templates/_macros.html:1551 +#: project/templates/_macros.html:1555 msgid "Link copied" msgstr "Link kopiert" -#: project/templates/_macros.html:1551 +#: project/templates/_macros.html:1555 msgid "Copy link" msgstr "Link kopieren" -#: project/templates/_macros.html:1581 +#: project/templates/_macros.html:1585 msgid "Google calendar" msgstr "Google Kalender" -#: project/templates/_macros.html:1583 +#: project/templates/_macros.html:1587 msgid "Apple calendar" msgstr "Apple Kalender" -#: project/templates/_macros.html:1584 +#: project/templates/_macros.html:1588 msgid "Yahoo calendar" msgstr "Yahoo Kalender" -#: project/templates/_macros.html:1585 +#: project/templates/_macros.html:1589 msgid "Other calendar" msgstr "Anderer Kalender" -#: project/templates/_macros.html:1770 +#: project/templates/_macros.html:1774 msgid "Remove event date" msgstr "Termin entfernen" -#: project/templates/_macros.html:1803 project/templates/event/create.html:180 +#: project/templates/_macros.html:1807 project/templates/event/create.html:180 #: project/templates/event/update.html:103 #: project/templates/event_date/list.html:446 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "Veranstalter eingeben" -#: project/templates/_macros.html:1831 +#: project/templates/_macros.html:1835 msgid "Enter list name" msgstr "Listenname eingeben" @@ -1676,10 +1695,11 @@ msgstr "Listenname eingeben" msgid "Manage" msgstr "Verwaltung" -#: project/templates/home.html:37 project/templates/layout.html:173 +#: project/templates/home.html:37 project/templates/layout.html:176 #: project/templates/manage/admin_units.html:28 #: project/templates/manage/verification_requests_outgoing.html:13 #: project/templates/manage/verification_requests_outgoing_create_select.html:13 +#: project/templates/planning/list.html:68 #: project/templates/security/login_user.html:21 #: project/templates/security/register_user.html:43 msgid "Docs" @@ -1689,7 +1709,7 @@ msgstr "Doku" msgid "Features" msgstr "Features" -#: project/templates/layout.html:167 project/templates/layout.html:215 +#: project/templates/layout.html:170 project/templates/layout.html:218 #: project/templates/manage/events.html:6 #: project/templates/manage/events.html:54 #: project/templates/manage/events_vue.html:4 @@ -1699,18 +1719,18 @@ msgstr "Veranstaltungen" #: project/templates/admin/admin.html:19 #: project/templates/admin/admin_units.html:4 #: project/templates/admin/admin_units.html:11 -#: project/templates/layout.html:168 project/templates/layout.html:181 +#: project/templates/layout.html:171 project/templates/layout.html:184 #: project/templates/manage/admin_units.html:3 #: project/templates/manage/admin_units.html:26 #: project/templates/organization/main.html:4 msgid "Organizations" msgstr "Organisationen" -#: project/templates/layout.html:169 -msgid "Planing" +#: project/templates/layout.html:172 +msgid "Planning" msgstr "Planung" -#: project/templates/layout.html:182 project/templates/layout.html:294 +#: project/templates/layout.html:185 project/templates/layout.html:297 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1723,100 +1743,100 @@ msgstr "Profil" #: project/templates/admin/email.html:65 #: project/templates/admin/newsletter.html:92 #: project/templates/admin/settings.html:10 -#: project/templates/admin/users.html:10 project/templates/layout.html:186 +#: project/templates/admin/users.html:10 project/templates/layout.html:189 msgid "Admin" msgstr "Administration" -#: project/templates/layout.html:190 +#: project/templates/layout.html:193 msgid "Logout" msgstr "Ausloggen" -#: project/templates/layout.html:221 +#: project/templates/layout.html:224 msgid "Show events" msgstr "Veranstaltungen anzeigen" #: project/templates/event/create.html:5 -#: project/templates/event/create.html:225 project/templates/layout.html:222 +#: project/templates/event/create.html:225 project/templates/layout.html:225 #: project/templates/manage/events.html:55 #: project/templates/manage/organizers.html:38 msgid "Create event" msgstr "Veranstaltung erstellen" -#: project/templates/layout.html:223 +#: project/templates/layout.html:226 msgid "Import event" msgstr "Veranstaltung importieren" -#: project/templates/layout.html:225 +#: project/templates/layout.html:228 #: project/templates/manage/event_lists.html:4 msgid "Event lists" msgstr "Veranstaltungslisten" -#: project/templates/layout.html:228 +#: project/templates/layout.html:231 msgid "Review suggestions" msgstr "Vorschläge prüfen" -#: project/templates/layout.html:238 +#: project/templates/layout.html:241 #: project/templates/manage/references_incoming.html:5 #: project/templates/manage/references_outgoing.html:5 msgid "References" msgstr "Empfehlungen" -#: project/templates/layout.html:244 +#: project/templates/layout.html:247 #: project/templates/manage/references_incoming.html:9 msgid "Incoming references" msgstr "Eingehende Empfehlungen" -#: project/templates/layout.html:245 +#: project/templates/layout.html:248 #: project/templates/manage/references_outgoing.html:9 msgid "Outgoing references" msgstr "Ausgehende Empfehlungen" -#: project/templates/layout.html:247 +#: project/templates/layout.html:250 #: project/templates/manage/reference_requests_incoming.html:9 msgid "Incoming reference requests" msgstr "Eingehende Empfehlungsanfragen" -#: project/templates/layout.html:252 +#: project/templates/layout.html:255 #: project/templates/manage/reference_requests_outgoing.html:9 msgid "Outgoing reference requests" msgstr "Ausgehende Empfehlungsanfragen" -#: project/templates/layout.html:264 +#: project/templates/layout.html:267 #: project/templates/manage/verification_requests_outgoing.html:5 #: project/templates/manage/verification_requests_outgoing.html:10 msgid "Outgoing verification requests" msgstr "Ausgehende Verifizierungsanfragen" -#: project/templates/layout.html:268 project/templates/manage/organizers.html:5 +#: project/templates/layout.html:271 project/templates/manage/organizers.html:5 #: project/templates/manage/organizers.html:10 #: project/templates/organizer/main.html:4 msgid "Organizers" msgstr "Veranstalter" #: project/templates/event_place/list.html:3 -#: project/templates/event_place/list.html:7 project/templates/layout.html:269 +#: project/templates/event_place/list.html:7 project/templates/layout.html:272 #: project/templates/manage/places.html:5 #: project/templates/manage/places.html:10 msgid "Places" msgstr "Orte" -#: project/templates/layout.html:271 project/templates/manage/members.html:5 +#: project/templates/layout.html:274 project/templates/manage/members.html:5 #: project/templates/manage/members.html:28 #: project/templates/verification_request/review.html:54 msgid "Members" msgstr "Mitglieder" -#: project/templates/layout.html:272 project/templates/manage/relations.html:4 +#: project/templates/layout.html:275 project/templates/manage/relations.html:4 msgid "Relations" msgstr "Beziehungen" -#: project/templates/layout.html:276 +#: project/templates/layout.html:279 #: project/templates/manage/verification_requests_incoming.html:5 #: project/templates/manage/verification_requests_incoming.html:9 msgid "Incoming verification requests" msgstr "Eingehende Verifizierungsanfragen" -#: project/templates/layout.html:284 +#: project/templates/layout.html:287 #: project/templates/manage/admin_units.html:17 #: project/templates/manage/organization_invitations.html:4 #: project/templates/user/organization_invitations.html:4 @@ -1828,33 +1848,33 @@ msgstr "Organisationseinladungen" #: project/templates/admin/settings.html:11 #: project/templates/admin_unit/update.html:6 #: project/templates/admin_unit/update.html:30 -#: project/templates/layout.html:288 project/templates/manage/widgets.html:11 +#: project/templates/layout.html:291 project/templates/manage/widgets.html:11 #: project/templates/manage/widgets.html:15 project/templates/profile.html:32 msgid "Settings" msgstr "Einstellungen" -#: project/templates/layout.html:289 project/templates/manage/export.html:3 +#: project/templates/layout.html:292 project/templates/manage/export.html:3 #: project/templates/manage/export.html:63 msgid "Export" msgstr "Export" -#: project/templates/layout.html:291 +#: project/templates/layout.html:294 #: project/templates/manage/custom_widgets.html:13 msgid "Custom widgets" msgstr "Custom widgets" -#: project/templates/layout.html:292 project/templates/manage/reviews.html:10 +#: project/templates/layout.html:295 project/templates/manage/reviews.html:10 #: project/templates/manage/widgets.html:5 #: project/templates/manage/widgets.html:9 msgid "Widgets" msgstr "Widgets" -#: project/templates/layout.html:304 +#: project/templates/layout.html:307 msgid "Switch organization" msgstr "Organisation wechseln" #: project/templates/developer/read.html:4 -#: project/templates/developer/read.html:8 project/templates/layout.html:351 +#: project/templates/developer/read.html:8 project/templates/layout.html:354 #: project/templates/profile.html:45 msgid "Developer" msgstr "Entwickler" @@ -2472,11 +2492,15 @@ msgstr "Aktiv" msgid "Revoke" msgstr "Widerrufen" -#: project/templates/planing/list.html:5 -#: project/templates/planing/list.html:105 -msgid "Event Planing" +#: project/templates/planning/list.html:5 +#: project/templates/planning/list.html:66 +msgid "Event Planning" msgstr "Planungsassistent" +#: project/templates/planning/list.html:76 +msgid "Filters" +msgstr "Filter" + #: project/templates/reference/read.html:4 #: project/templates/reference/read.html:8 #: project/templates/reference/read.html:29 @@ -2693,19 +2717,23 @@ msgstr "Veranstaltung erfolgreich veröffentlicht" msgid "Draft successfully saved" msgstr "Entwurf erfolgreich gespeichert" -#: project/views/event.py:226 +#: project/views/event.py:185 +msgid "Event successfully planned" +msgstr "Veranstaltung erfolgreich geplant" + +#: project/views/event.py:228 msgid "Event successfully updated" msgstr "Veranstaltung erfolgreich aktualisiert" -#: project/views/event.py:252 +#: project/views/event.py:254 msgid "Event successfully deleted" msgstr "Veranstaltung erfolgreich gelöscht" -#: project/views/event.py:417 +#: project/views/event.py:419 msgid "Referenced event changed" msgstr "Empfohlene Veranstaltung wurde geändert" -#: project/views/event.py:440 +#: project/views/event.py:442 msgid "New event report" msgstr "Neue Meldung zu einer Veranstaltung" @@ -3021,3 +3049,6 @@ msgstr "Neue Veranstaltung zu prüfen" #~ msgid "Short name" #~ msgstr "Kurzname" +#~ msgid "Select the public status of the event." +#~ msgstr "Wähle den öffentlichen Status der Veranstaltung." + diff --git a/project/translations/en/LC_MESSAGES/messages.mo b/project/translations/en/LC_MESSAGES/messages.mo index f40971a80f99bf6007d2be7beaef810e84fb4e7e..a7dd873343372b826b8078bde92bae337eec2a24 100644 GIT binary patch delta 20 ccmaDa|6YE>Yfg4c1w&&iW24QVIRCN&09OkK)Bpeg delta 20 ccmaDa|6YE>Yfg3}1w$h%L$l4FIRCN&09LpM&Hw-a diff --git a/project/translations/en/LC_MESSAGES/messages.po b/project/translations/en/LC_MESSAGES/messages.po index e8ef0a0..a6928b3 100644 --- a/project/translations/en/LC_MESSAGES/messages.po +++ b/project/translations/en/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: 2023-06-02 12:16+0200\n" +"POT-Creation-Date: 2023-06-09 13:32+0200\n" "PO-Revision-Date: 2021-04-30 15:04+0200\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -203,24 +203,24 @@ msgstr "" msgid "You have received an invitation" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:334 +#: project/forms/admin.py:11 project/templates/layout.html:337 #: project/views/root.py:55 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:12 project/templates/layout.html:339 +#: project/forms/admin.py:12 project/templates/layout.html:342 #: project/views/root.py:67 msgid "Legal notice" msgstr "" -#: project/forms/admin.py:13 project/templates/_macros.html:1461 -#: project/templates/layout.html:343 +#: project/forms/admin.py:13 project/templates/_macros.html:1465 +#: project/templates/layout.html:346 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:83 project/views/root.py:75 msgid "Contact" msgstr "" -#: project/forms/admin.py:14 project/templates/layout.html:347 +#: project/forms/admin.py:14 project/templates/layout.html:350 #: project/views/root.py:83 msgid "Privacy" msgstr "" @@ -261,7 +261,7 @@ msgstr "" #: project/forms/admin_unit_member.py:30 project/forms/event.py:107 #: project/forms/event_suggestion.py:38 project/forms/organizer.py:33 #: project/forms/user.py:18 project/forms/user.py:23 -#: project/templates/_macros.html:246 project/templates/_macros.html:1557 +#: project/templates/_macros.html:246 project/templates/_macros.html:1561 #: project/templates/admin/admin.html:27 project/templates/admin/email.html:4 #: project/templates/admin/email.html:66 project/templates/admin/users.html:19 #: project/templates/manage/organizers.html:21 @@ -366,9 +366,9 @@ msgstr "" msgid "Street" msgstr "" -#: project/forms/admin_unit.py:18 project/forms/event.py:453 +#: project/forms/admin_unit.py:18 project/forms/event.py:461 #: project/forms/event_date.py:52 project/forms/event_place.py:16 -#: project/forms/organizer.py:16 +#: project/forms/organizer.py:16 project/forms/planning.py:44 msgid "Postal code" msgstr "" @@ -408,7 +408,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:48 project/templates/_macros.html:1599 +#: project/forms/admin_unit.py:48 project/templates/_macros.html:1603 msgid "Short name must contain only letters numbers or underscore" msgstr "" @@ -429,13 +429,13 @@ msgstr "" #: project/forms/admin_unit.py:61 project/forms/event.py:108 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:34 -#: project/templates/_macros.html:305 +#: project/templates/_macros.html:309 #: project/templates/manage/organizers.html:20 msgid "Phone" msgstr "" #: project/forms/admin_unit.py:62 project/forms/event.py:109 -#: project/forms/organizer.py:35 project/templates/_macros.html:313 +#: project/forms/organizer.py:35 project/templates/_macros.html:317 msgid "Fax" msgstr "" @@ -520,7 +520,7 @@ msgstr "" msgid "Cancel deletion" msgstr "" -#: project/forms/admin_unit.py:158 project/templates/layout.html:305 +#: project/forms/admin_unit.py:158 project/templates/layout.html:308 #: project/templates/manage/delete_membership.html:6 msgid "Leave organization" msgstr "" @@ -654,20 +654,20 @@ msgid "" "days." msgstr "" -#: project/forms/event.py:50 project/templates/planing/list.html:75 +#: project/forms/event.py:50 msgid "All-day" msgstr "" -#: project/forms/event.py:54 project/templates/_macros.html:1769 +#: project/forms/event.py:54 project/templates/_macros.html:1773 #: project/templates/widget/event_suggestion/create.html:240 msgid "Recurring event" msgstr "" -#: project/forms/event.py:61 project/templates/_macros.html:1318 +#: project/forms/event.py:61 project/templates/_macros.html:1322 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:67 project/templates/_macros.html:1335 +#: project/forms/event.py:67 project/templates/_macros.html:1339 msgid "An event can last a maximum of 14 days." msgstr "" @@ -748,7 +748,7 @@ msgid "If the participants needs to register for the event." msgstr "" #: project/forms/event.py:170 project/templates/_macros.html:260 -#: project/templates/layout.html:115 +#: project/templates/layout.html:118 msgid "Booked up" msgstr "" @@ -804,11 +804,11 @@ msgstr "" msgid "EventAttendanceMode.offline" msgstr "Normal (Offline)" -#: project/forms/event.py:217 project/templates/layout.html:103 +#: project/forms/event.py:217 project/templates/layout.html:106 msgid "EventAttendanceMode.online" msgstr "Online" -#: project/forms/event.py:219 project/templates/layout.html:106 +#: project/forms/event.py:219 project/templates/layout.html:109 msgid "EventAttendanceMode.mixed" msgstr "Online and offline" @@ -831,8 +831,8 @@ msgid "" " course it works without it." msgstr "" -#: project/forms/event.py:242 project/templates/_macros.html:418 -#: project/templates/_macros.html:581 +#: project/forms/event.py:242 project/templates/_macros.html:422 +#: project/templates/_macros.html:585 msgid "Previous start date" msgstr "" @@ -877,9 +877,9 @@ msgid "Invalid co-organizer." msgstr "" #: project/forms/event.py:286 project/forms/event.py:295 -#: project/forms/event.py:368 project/forms/event.py:442 -#: project/forms/event_suggestion.py:50 project/templates/_macros.html:458 -#: project/templates/_macros.html:624 project/templates/event/create.html:288 +#: project/forms/event.py:373 project/forms/event.py:450 +#: project/forms/event_suggestion.py:50 project/templates/_macros.html:462 +#: project/templates/_macros.html:628 project/templates/event/create.html:288 #: project/templates/event/update.html:170 #: project/templates/event_place/create.html:31 #: project/templates/event_place/delete.html:13 @@ -897,9 +897,9 @@ msgid "Enter new place" msgstr "" #: project/forms/event.py:302 project/forms/event.py:311 -#: project/forms/event.py:376 project/forms/event.py:439 +#: project/forms/event.py:381 project/forms/event.py:447 #: project/forms/event_date.py:40 project/forms/event_suggestion.py:60 -#: project/templates/_macros.html:495 project/templates/_macros.html:667 +#: project/templates/_macros.html:499 project/templates/_macros.html:671 #: project/templates/event/create.html:257 #: project/templates/event/update.html:160 #: project/templates/manage/events.html:104 @@ -922,110 +922,118 @@ msgid "Save as draft" msgstr "" #: project/forms/event.py:318 +msgid "Save as planned" +msgstr "" + +#: project/forms/event.py:319 msgid "Publish event" msgstr "" -#: project/forms/event.py:350 +#: project/forms/event.py:355 msgid "Select existing place or enter new place" msgstr "" -#: project/forms/event.py:358 +#: project/forms/event.py:363 msgid "Select existing organizer or enter new organizer" msgstr "" -#: project/forms/event.py:371 +#: project/forms/event.py:376 msgid "" "Choose where the event takes place. You can add and modify places at " "Organization > Places." msgstr "" -#: project/forms/event.py:379 +#: project/forms/event.py:384 msgid "" "Select the organizer. You can add and modify organizers at Organization >" " Organizers." msgstr "" -#: project/forms/event.py:385 project/templates/event/update.html:149 +#: project/forms/event.py:390 project/templates/event/update.html:149 #: project/templates/oauth2_token/list.html:21 msgid "Status" msgstr "" -#: project/forms/event.py:388 +#: project/forms/event.py:393 msgid "EventStatus.scheduled" msgstr "Scheduled" -#: project/forms/event.py:389 project/templates/layout.html:69 -#: project/templates/layout.html:84 +#: project/forms/event.py:394 project/templates/layout.html:72 +#: project/templates/layout.html:87 msgid "EventStatus.cancelled" msgstr "Cancelled" -#: project/forms/event.py:390 project/templates/layout.html:72 -#: project/templates/layout.html:87 +#: project/forms/event.py:395 project/templates/layout.html:75 +#: project/templates/layout.html:90 msgid "EventStatus.movedOnline" msgstr "Moved online" -#: project/forms/event.py:391 project/templates/layout.html:75 -#: project/templates/layout.html:90 +#: project/forms/event.py:396 project/templates/layout.html:78 +#: project/templates/layout.html:93 msgid "EventStatus.postponed" msgstr "Postponed" -#: project/forms/event.py:392 project/templates/layout.html:78 -#: project/templates/layout.html:93 +#: project/forms/event.py:397 project/templates/layout.html:81 +#: project/templates/layout.html:96 msgid "EventStatus.rescheduled" msgstr "Rescheduled" -#: project/forms/event.py:394 +#: project/forms/event.py:399 msgid "Select the status of the event." msgstr "" -#: project/forms/event.py:398 +#: project/forms/event.py:403 msgid "Public status" msgstr "" -#: project/forms/event.py:401 +#: project/forms/event.py:406 msgid "PublicStatus.published" msgstr "" -#: project/forms/event.py:402 project/templates/_macros.html:266 +#: project/forms/event.py:407 project/templates/_macros.html:269 +msgid "PublicStatus.planned" +msgstr "" + +#: project/forms/event.py:408 project/templates/_macros.html:267 msgid "PublicStatus.draft" msgstr "" -#: project/forms/event.py:404 -msgid "Select the public status of the event." +#: project/forms/event.py:410 project/templates/event/create.html:371 +msgid "Planned events appear in the scheduling view, but not on public calendars." msgstr "" -#: project/forms/event.py:407 project/templates/event/update.html:5 +#: project/forms/event.py:415 project/templates/event/update.html:5 #: project/templates/event/update.html:117 msgid "Update event" msgstr "" -#: project/forms/event.py:423 project/templates/_macros.html:1275 +#: project/forms/event.py:431 project/templates/_macros.html:1279 #: project/templates/event/actions.html:66 #: project/templates/event/delete.html:6 msgid "Delete event" msgstr "" -#: project/forms/event.py:430 project/forms/event_date.py:14 -#: project/forms/planing.py:14 +#: project/forms/event.py:438 project/forms/event_date.py:14 +#: project/forms/planning.py:21 msgid "From" msgstr "" -#: project/forms/event.py:432 project/forms/event_date.py:16 -#: project/forms/planing.py:16 +#: project/forms/event.py:440 project/forms/event_date.py:16 +#: project/forms/planning.py:22 msgid "to" msgstr "" -#: project/forms/event.py:434 project/forms/event_date.py:18 +#: project/forms/event.py:442 project/forms/event_date.py:18 msgid "Keyword" msgstr "" -#: project/forms/event.py:436 project/forms/event_date.py:20 -#: project/forms/planing.py:19 project/templates/_macros.html:391 +#: project/forms/event.py:444 project/forms/event_date.py:20 +#: project/forms/planning.py:24 project/templates/_macros.html:395 msgid "Category" msgstr "" -#: project/forms/event.py:446 project/forms/event_date.py:26 -#: project/forms/planing.py:22 project/templates/_macros.html:320 +#: project/forms/event.py:454 project/forms/event_date.py:26 +#: project/forms/planning.py:27 project/templates/_macros.html:324 #: project/templates/admin_unit/create.html:39 #: project/templates/admin_unit/update.html:47 #: project/templates/event_place/create.html:40 @@ -1037,28 +1045,29 @@ msgstr "" msgid "Location" msgstr "" -#: project/forms/event.py:448 project/forms/event_date.py:28 -#: project/forms/planing.py:24 +#: project/forms/event.py:456 project/forms/event_date.py:28 +#: project/forms/planning.py:29 msgid "Distance" msgstr "" -#: project/forms/event.py:455 project/forms/event_date.py:49 +#: project/forms/event.py:463 project/forms/event_date.py:49 +#: project/forms/planning.py:41 msgid "Exclude recurring events" msgstr "" -#: project/forms/event.py:459 project/forms/event_date.py:54 +#: project/forms/event.py:467 project/forms/event_date.py:54 msgid "Find events" msgstr "" #: project/forms/event_date.py:35 project/forms/reference.py:11 -#: project/forms/reference_request.py:16 project/templates/_macros.html:511 -#: project/templates/_macros.html:684 +#: project/forms/reference_request.py:16 project/templates/_macros.html:515 +#: project/templates/_macros.html:688 #: project/templates/admin/delete_admin_unit.html:13 #: project/templates/admin_unit/cancel_deletion.html:13 #: project/templates/admin_unit/create.html:28 #: project/templates/admin_unit/request_deletion.html:15 #: project/templates/admin_unit/update.html:36 -#: project/templates/layout.html:257 +#: project/templates/layout.html:260 #: project/templates/manage/delete_membership.html:13 #: project/templates/verification_request/delete.html:13 #: project/templates/verification_request/review.html:28 @@ -1069,7 +1078,7 @@ msgstr "" msgid "Show unreferenced events only" msgstr "" -#: project/forms/event_date.py:63 project/forms/planing.py:36 +#: project/forms/event_date.py:63 #: project/templates/widget/event_date/list.html:82 msgid "Find" msgstr "" @@ -1194,10 +1203,18 @@ msgstr "" msgid "Delete organizer" msgstr "" -#: project/forms/planing.py:30 +#: project/forms/planning.py:35 msgid "Weekdays" msgstr "" +#: project/forms/planning.py:46 +msgid "Min. expected number of participants" +msgstr "" + +#: project/forms/planning.py:50 project/templates/planning/list.html:98 +msgid "Refresh" +msgstr "" + #: project/forms/reference.py:22 msgid "Save reference" msgstr "" @@ -1223,7 +1240,7 @@ msgid "Delete request" msgstr "" #: project/forms/reference_request.py:28 -#: project/forms/verification_request.py:24 project/templates/_macros.html:1473 +#: project/forms/verification_request.py:24 project/templates/_macros.html:1477 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 #: project/templates/verification_request/review_status.html:4 @@ -1373,31 +1390,31 @@ msgstr "" msgid "Link" msgstr "" -#: project/templates/_macros.html:299 +#: project/templates/_macros.html:303 msgid "Verified" msgstr "" -#: project/templates/_macros.html:368 +#: project/templates/_macros.html:372 #, python-format msgid "Created at %(created_at)s by %(created_by)s." msgstr "" -#: project/templates/_macros.html:370 +#: project/templates/_macros.html:374 #, python-format msgid "Created at %(created_at)s." msgstr "" -#: project/templates/_macros.html:375 +#: project/templates/_macros.html:379 #, python-format msgid "Last updated at %(updated_at)s by %(updated_by)s." msgstr "" -#: project/templates/_macros.html:377 +#: project/templates/_macros.html:381 #, python-format msgid "Last updated at %(updated_at)s." msgstr "" -#: project/templates/_macros.html:407 project/templates/_macros.html:577 +#: project/templates/_macros.html:411 project/templates/_macros.html:581 #: project/templates/event/actions.html:25 #: project/templates/event/create.html:234 #: project/templates/event/update.html:126 @@ -1406,44 +1423,44 @@ msgstr "" msgid "Event" msgstr "" -#: project/templates/_macros.html:413 project/templates/_macros.html:999 +#: project/templates/_macros.html:417 project/templates/_macros.html:1003 msgid "Date" msgstr "" -#: project/templates/_macros.html:440 project/templates/_macros.html:599 -#: project/templates/_macros.html:1542 project/templates/event/actions.html:51 +#: project/templates/_macros.html:444 project/templates/_macros.html:603 +#: project/templates/_macros.html:1546 project/templates/event/actions.html:51 msgid "Share" msgstr "" -#: project/templates/_macros.html:444 project/templates/_macros.html:603 -#: project/templates/_macros.html:1572 +#: project/templates/_macros.html:448 project/templates/_macros.html:607 +#: project/templates/_macros.html:1576 msgid "Add to calendar" msgstr "" -#: project/templates/_macros.html:452 project/templates/_macros.html:617 +#: project/templates/_macros.html:456 project/templates/_macros.html:621 #: project/templates/event/report.html:4 msgid "Report event" msgstr "" -#: project/templates/_macros.html:479 project/templates/_macros.html:650 +#: project/templates/_macros.html:483 project/templates/_macros.html:654 msgid "Show directions" msgstr "" -#: project/templates/_macros.html:484 project/templates/_macros.html:642 +#: project/templates/_macros.html:488 project/templates/_macros.html:646 msgid "The event takes place online." msgstr "" -#: project/templates/_macros.html:486 project/templates/_macros.html:644 +#: project/templates/_macros.html:490 project/templates/_macros.html:648 msgid "The event takes place both offline and online." msgstr "" -#: project/templates/_macros.html:607 project/templates/layout.html:183 +#: project/templates/_macros.html:611 project/templates/layout.html:186 #: project/templates/user/favorite_events.html:4 msgid "Favorite events" msgstr "" -#: project/templates/_macros.html:610 project/templates/_macros.html:653 -#: project/templates/_macros.html:785 +#: project/templates/_macros.html:614 project/templates/_macros.html:657 +#: project/templates/_macros.html:789 #: project/templates/admin/admin_units.html:36 #: project/templates/admin/users.html:36 #: project/templates/manage/events.html:118 @@ -1456,11 +1473,11 @@ msgstr "" msgid "Edit" msgstr "" -#: project/templates/_macros.html:711 +#: project/templates/_macros.html:715 msgid "Referenced by" msgstr "" -#: project/templates/_macros.html:723 project/templates/_macros.html:1285 +#: project/templates/_macros.html:727 project/templates/_macros.html:1289 #: project/templates/event/actions.html:38 #: project/templates/event_date/list.html:251 #: project/templates/manage/events.html:125 @@ -1468,39 +1485,39 @@ msgstr "" msgid "Reference event" msgstr "" -#: project/templates/_macros.html:732 +#: project/templates/_macros.html:736 #: project/templates/manage/reference_requests_incoming.html:5 #: project/templates/manage/reference_requests_outgoing.html:5 msgid "Reference requests" msgstr "" -#: project/templates/_macros.html:743 project/templates/_macros.html:1282 +#: project/templates/_macros.html:747 project/templates/_macros.html:1286 #: project/templates/event/actions.html:32 #: project/templates/manage/events.html:123 msgid "Request reference" msgstr "" -#: project/templates/_macros.html:751 project/templates/event_date/list.html:6 +#: project/templates/_macros.html:755 project/templates/event_date/list.html:6 #: project/templates/event_date/list.html:461 #: project/templates/reference_request/review.html:32 msgid "Event Dates" msgstr "" -#: project/templates/_macros.html:849 +#: project/templates/_macros.html:853 msgid "Search location on Google" msgstr "" -#: project/templates/_macros.html:916 +#: project/templates/_macros.html:920 #, python-format msgid "%(count)d event dates" msgstr "" -#: project/templates/_macros.html:939 project/templates/_macros.html:941 +#: project/templates/_macros.html:943 project/templates/_macros.html:945 #: project/templates/event_date/list.html:510 msgid "First" msgstr "" -#: project/templates/_macros.html:944 project/templates/_macros.html:946 +#: project/templates/_macros.html:948 project/templates/_macros.html:950 #: project/templates/event_date/list.html:511 #: project/templates/widget/event_suggestion/create.html:193 #: project/templates/widget/event_suggestion/create.html:218 @@ -1511,12 +1528,12 @@ msgstr "" msgid "Previous" msgstr "" -#: project/templates/_macros.html:948 +#: project/templates/_macros.html:952 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "" -#: project/templates/_macros.html:950 project/templates/_macros.html:952 +#: project/templates/_macros.html:954 project/templates/_macros.html:956 #: project/templates/event_date/list.html:513 #: project/templates/widget/event_suggestion/create.html:194 #: project/templates/widget/event_suggestion/create.html:219 @@ -1526,98 +1543,98 @@ msgstr "" msgid "Next" msgstr "" -#: project/templates/_macros.html:955 project/templates/_macros.html:957 +#: project/templates/_macros.html:959 project/templates/_macros.html:961 #: project/templates/event_date/list.html:514 msgid "Last" msgstr "" -#: project/templates/_macros.html:1022 +#: project/templates/_macros.html:1026 msgid "Radius" msgstr "" -#: project/templates/_macros.html:1204 +#: project/templates/_macros.html:1208 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1225 +#: project/templates/_macros.html:1229 project/templates/planning/list.html:97 msgid "Close" msgstr "" -#: project/templates/_macros.html:1226 +#: project/templates/_macros.html:1230 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1238 +#: project/templates/_macros.html:1242 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1274 project/templates/event/actions.html:65 +#: project/templates/_macros.html:1278 project/templates/event/actions.html:65 #: project/templates/event/delete.html:12 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1278 project/templates/event/actions.html:58 +#: project/templates/_macros.html:1282 project/templates/event/actions.html:58 msgid "Duplicate event" msgstr "" -#: project/templates/_macros.html:1289 project/templates/event/actions.html:44 +#: project/templates/_macros.html:1293 project/templates/event/actions.html:44 #: project/templates/manage/events.html:129 msgid "Add to list" msgstr "" -#: project/templates/_macros.html:1292 project/templates/manage/events.html:132 +#: project/templates/_macros.html:1296 project/templates/manage/events.html:132 msgid "More" msgstr "" -#: project/templates/_macros.html:1339 +#: project/templates/_macros.html:1343 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "" -#: project/templates/_macros.html:1367 +#: project/templates/_macros.html:1371 #, python-format msgid "Just use %(term)s" msgstr "" -#: project/templates/_macros.html:1433 +#: project/templates/_macros.html:1437 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1551 +#: project/templates/_macros.html:1555 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1551 +#: project/templates/_macros.html:1555 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1581 +#: project/templates/_macros.html:1585 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1583 +#: project/templates/_macros.html:1587 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1584 +#: project/templates/_macros.html:1588 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1585 +#: project/templates/_macros.html:1589 msgid "Other calendar" msgstr "" -#: project/templates/_macros.html:1770 +#: project/templates/_macros.html:1774 msgid "Remove event date" msgstr "" -#: project/templates/_macros.html:1803 project/templates/event/create.html:180 +#: project/templates/_macros.html:1807 project/templates/event/create.html:180 #: project/templates/event/update.html:103 #: project/templates/event_date/list.html:446 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "" -#: project/templates/_macros.html:1831 +#: project/templates/_macros.html:1835 msgid "Enter list name" msgstr "" @@ -1625,10 +1642,11 @@ msgstr "" msgid "Manage" msgstr "" -#: project/templates/home.html:37 project/templates/layout.html:173 +#: project/templates/home.html:37 project/templates/layout.html:176 #: project/templates/manage/admin_units.html:28 #: project/templates/manage/verification_requests_outgoing.html:13 #: project/templates/manage/verification_requests_outgoing_create_select.html:13 +#: project/templates/planning/list.html:68 #: project/templates/security/login_user.html:21 #: project/templates/security/register_user.html:43 msgid "Docs" @@ -1638,7 +1656,7 @@ msgstr "" msgid "Features" msgstr "" -#: project/templates/layout.html:167 project/templates/layout.html:215 +#: project/templates/layout.html:170 project/templates/layout.html:218 #: project/templates/manage/events.html:6 #: project/templates/manage/events.html:54 #: project/templates/manage/events_vue.html:4 @@ -1648,18 +1666,18 @@ msgstr "" #: project/templates/admin/admin.html:19 #: project/templates/admin/admin_units.html:4 #: project/templates/admin/admin_units.html:11 -#: project/templates/layout.html:168 project/templates/layout.html:181 +#: project/templates/layout.html:171 project/templates/layout.html:184 #: project/templates/manage/admin_units.html:3 #: project/templates/manage/admin_units.html:26 #: project/templates/organization/main.html:4 msgid "Organizations" msgstr "" -#: project/templates/layout.html:169 -msgid "Planing" +#: project/templates/layout.html:172 +msgid "Planning" msgstr "" -#: project/templates/layout.html:182 project/templates/layout.html:294 +#: project/templates/layout.html:185 project/templates/layout.html:297 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1672,100 +1690,100 @@ msgstr "" #: project/templates/admin/email.html:65 #: project/templates/admin/newsletter.html:92 #: project/templates/admin/settings.html:10 -#: project/templates/admin/users.html:10 project/templates/layout.html:186 +#: project/templates/admin/users.html:10 project/templates/layout.html:189 msgid "Admin" msgstr "" -#: project/templates/layout.html:190 +#: project/templates/layout.html:193 msgid "Logout" msgstr "" -#: project/templates/layout.html:221 +#: project/templates/layout.html:224 msgid "Show events" msgstr "" #: project/templates/event/create.html:5 -#: project/templates/event/create.html:225 project/templates/layout.html:222 +#: project/templates/event/create.html:225 project/templates/layout.html:225 #: project/templates/manage/events.html:55 #: project/templates/manage/organizers.html:38 msgid "Create event" msgstr "" -#: project/templates/layout.html:223 +#: project/templates/layout.html:226 msgid "Import event" msgstr "" -#: project/templates/layout.html:225 +#: project/templates/layout.html:228 #: project/templates/manage/event_lists.html:4 msgid "Event lists" msgstr "" -#: project/templates/layout.html:228 +#: project/templates/layout.html:231 msgid "Review suggestions" msgstr "" -#: project/templates/layout.html:238 +#: project/templates/layout.html:241 #: project/templates/manage/references_incoming.html:5 #: project/templates/manage/references_outgoing.html:5 msgid "References" msgstr "" -#: project/templates/layout.html:244 +#: project/templates/layout.html:247 #: project/templates/manage/references_incoming.html:9 msgid "Incoming references" msgstr "" -#: project/templates/layout.html:245 +#: project/templates/layout.html:248 #: project/templates/manage/references_outgoing.html:9 msgid "Outgoing references" msgstr "" -#: project/templates/layout.html:247 +#: project/templates/layout.html:250 #: project/templates/manage/reference_requests_incoming.html:9 msgid "Incoming reference requests" msgstr "" -#: project/templates/layout.html:252 +#: project/templates/layout.html:255 #: project/templates/manage/reference_requests_outgoing.html:9 msgid "Outgoing reference requests" msgstr "" -#: project/templates/layout.html:264 +#: project/templates/layout.html:267 #: project/templates/manage/verification_requests_outgoing.html:5 #: project/templates/manage/verification_requests_outgoing.html:10 msgid "Outgoing verification requests" msgstr "" -#: project/templates/layout.html:268 project/templates/manage/organizers.html:5 +#: project/templates/layout.html:271 project/templates/manage/organizers.html:5 #: project/templates/manage/organizers.html:10 #: project/templates/organizer/main.html:4 msgid "Organizers" msgstr "" #: project/templates/event_place/list.html:3 -#: project/templates/event_place/list.html:7 project/templates/layout.html:269 +#: project/templates/event_place/list.html:7 project/templates/layout.html:272 #: project/templates/manage/places.html:5 #: project/templates/manage/places.html:10 msgid "Places" msgstr "" -#: project/templates/layout.html:271 project/templates/manage/members.html:5 +#: project/templates/layout.html:274 project/templates/manage/members.html:5 #: project/templates/manage/members.html:28 #: project/templates/verification_request/review.html:54 msgid "Members" msgstr "" -#: project/templates/layout.html:272 project/templates/manage/relations.html:4 +#: project/templates/layout.html:275 project/templates/manage/relations.html:4 msgid "Relations" msgstr "" -#: project/templates/layout.html:276 +#: project/templates/layout.html:279 #: project/templates/manage/verification_requests_incoming.html:5 #: project/templates/manage/verification_requests_incoming.html:9 msgid "Incoming verification requests" msgstr "" -#: project/templates/layout.html:284 +#: project/templates/layout.html:287 #: project/templates/manage/admin_units.html:17 #: project/templates/manage/organization_invitations.html:4 #: project/templates/user/organization_invitations.html:4 @@ -1777,33 +1795,33 @@ msgstr "" #: project/templates/admin/settings.html:11 #: project/templates/admin_unit/update.html:6 #: project/templates/admin_unit/update.html:30 -#: project/templates/layout.html:288 project/templates/manage/widgets.html:11 +#: project/templates/layout.html:291 project/templates/manage/widgets.html:11 #: project/templates/manage/widgets.html:15 project/templates/profile.html:32 msgid "Settings" msgstr "" -#: project/templates/layout.html:289 project/templates/manage/export.html:3 +#: project/templates/layout.html:292 project/templates/manage/export.html:3 #: project/templates/manage/export.html:63 msgid "Export" msgstr "" -#: project/templates/layout.html:291 +#: project/templates/layout.html:294 #: project/templates/manage/custom_widgets.html:13 msgid "Custom widgets" msgstr "" -#: project/templates/layout.html:292 project/templates/manage/reviews.html:10 +#: project/templates/layout.html:295 project/templates/manage/reviews.html:10 #: project/templates/manage/widgets.html:5 #: project/templates/manage/widgets.html:9 msgid "Widgets" msgstr "" -#: project/templates/layout.html:304 +#: project/templates/layout.html:307 msgid "Switch organization" msgstr "" #: project/templates/developer/read.html:4 -#: project/templates/developer/read.html:8 project/templates/layout.html:351 +#: project/templates/developer/read.html:8 project/templates/layout.html:354 #: project/templates/profile.html:45 msgid "Developer" msgstr "" @@ -2408,9 +2426,13 @@ msgstr "" msgid "Revoke" msgstr "" -#: project/templates/planing/list.html:5 -#: project/templates/planing/list.html:105 -msgid "Event Planing" +#: project/templates/planning/list.html:5 +#: project/templates/planning/list.html:66 +msgid "Event Planning" +msgstr "" + +#: project/templates/planning/list.html:76 +msgid "Filters" msgstr "" #: project/templates/reference/read.html:4 @@ -2624,19 +2646,23 @@ msgstr "" msgid "Draft successfully saved" msgstr "" -#: project/views/event.py:226 +#: project/views/event.py:185 +msgid "Event successfully planned" +msgstr "" + +#: project/views/event.py:228 msgid "Event successfully updated" msgstr "" -#: project/views/event.py:252 +#: project/views/event.py:254 msgid "Event successfully deleted" msgstr "" -#: project/views/event.py:417 +#: project/views/event.py:419 msgid "Referenced event changed" msgstr "" -#: project/views/event.py:440 +#: project/views/event.py:442 msgid "New event report" msgstr "" @@ -2931,3 +2957,6 @@ msgstr "" #~ msgid "Short name" #~ msgstr "" +#~ msgid "Select the public status of the event." +#~ msgstr "" + diff --git a/project/views/event.py b/project/views/event.py index 447c05d..361ee16 100644 --- a/project/views/event.py +++ b/project/views/event.py @@ -181,6 +181,8 @@ def event_create_for_admin_unit_id(id): gettext("Event successfully published") if event.public_status == PublicStatus.published else gettext("Draft successfully saved") + if event.public_status == PublicStatus.draft + else gettext("Event successfully planned") ) flash_message( success_msg, diff --git a/project/views/planing.py b/project/views/planing.py deleted file mode 100644 index 69a56b0..0000000 --- a/project/views/planing.py +++ /dev/null @@ -1,22 +0,0 @@ -from flask import render_template, request - -from project import app -from project.forms.planing import PlaningForm -from project.services.event_search import EventSearchParams -from project.views.event import get_event_category_choices - - -def prepare_event_date_form(form): - form.category_id.choices = get_event_category_choices() - form.category_id.choices.insert(0, (0, "")) - - -@app.route("/planing") -def planing(): - params = EventSearchParams() - params.set_planing_date_range() - - form = PlaningForm(formdata=request.args, obj=params) - prepare_event_date_form(form) - - return render_template("planing/list.html", form=form, params=params) diff --git a/project/views/planning.py b/project/views/planning.py new file mode 100644 index 0000000..789ab57 --- /dev/null +++ b/project/views/planning.py @@ -0,0 +1,27 @@ +from flask import render_template, request, url_for +from flask_security import auth_required + +from project import app +from project.access import can_use_planning +from project.forms.planning import PlanningForm +from project.services.event_search import EventSearchParams +from project.views.event import get_event_category_choices +from project.views.utils import permission_missing + + +@app.route("/planning") +@auth_required() +def planning(): + if not can_use_planning(): + return permission_missing(url_for("manage_admin_units")) + + params = EventSearchParams() + params.set_planning_date_range() + + form = PlanningForm(formdata=request.args, obj=params) + form.category_id.choices = get_event_category_choices() + form.category_id.data = [c[0] for c in form.category_id.choices] + form.weekday.data = [c[0] for c in form.weekday.choices] + form.exclude_recurring.data = True + + return render_template("planning/list.html", form=form, params=params) diff --git a/tests/api/test_event_date.py b/tests/api/test_event_date.py index 71c4cc0..4d34817 100644 --- a/tests/api/test_event_date.py +++ b/tests/api/test_event_date.py @@ -19,9 +19,16 @@ def test_read(client, seeder: Seeder, utils: UtilActions): response = utils.get_json(unverified_url) utils.assert_response_unauthorized(response) + seeder.create_event(admin_unit_id, planned=True) + planned_url = utils.get_url("api_v1_event_date", id=4) + response = utils.get_json(planned_url) + utils.assert_response_unauthorized(response) + seeder.authorize_api_access(user_id, admin_unit_id) response = utils.get_json(draft_url) utils.assert_response_ok(response) + response = utils.get_json(planned_url) + utils.assert_response_ok(response) def test_read_myUnverified(client, seeder: Seeder, utils: UtilActions): @@ -128,6 +135,35 @@ def test_search(client, seeder: Seeder, utils: UtilActions, app, db): response = utils.get_json_ok(url) assert len(response.json["items"]) == 2 + url = utils.get_url("api_v1_event_date_search", expected_participants_min=100) + response = utils.get_json_ok(url) + assert len(response.json["items"]) == 0 + + +def test_search_public_status(client, seeder: Seeder, utils: UtilActions, app, db): + user_id, admin_unit_id = seeder.setup_api_access(user_access=False) + published_id = seeder.create_event(admin_unit_id) + planned_id = seeder.create_event(admin_unit_id, planned=True) + seeder.create_event(admin_unit_id, draft=True) + + url = utils.get_url("api_v1_event_date_search") + response = utils.get_json_ok(url) + assert len(response.json["items"]) == 1 + assert response.json["items"][0]["event"]["id"] == published_id + + url = utils.get_url( + "api_v1_event_date_search", public_status=["published", "planned"] + ) + response = utils.get_json_ok(url) + assert len(response.json["items"]) == 1 + assert response.json["items"][0]["event"]["id"] == published_id + + seeder.authorize_api_access(user_id, admin_unit_id) + response = utils.get_json_ok(url) + assert len(response.json["items"]) == 2 + assert response.json["items"][0]["event"]["id"] == published_id + assert response.json["items"][1]["event"]["id"] == planned_id + def test_search_oneDay(client, seeder: Seeder, utils: UtilActions): from project.dateutils import create_berlin_date diff --git a/tests/seeder.py b/tests/seeder.py index 4c9efb3..c64121d 100644 --- a/tests/seeder.py +++ b/tests/seeder.py @@ -250,25 +250,6 @@ class Seeder(object): return organizer_id - def upsert_admin_unit_api_key(self, admin_unit_id, name): - from project.services.api_key import upsert_api_key - - with self._app.app_context(): - api_key = upsert_api_key(admin_unit_id, name) - self._db.session.commit() - api_key_id = api_key.id - - return api_key_id - - def upsert_default_admin_unit_api_key(self, admin_unit_id): - from project.services.admin_unit import get_admin_unit_by_id - - with self._app.app_context(): - admin_unit = get_admin_unit_by_id(admin_unit_id) - api_key_id = self.upsert_admin_unit_api_key(admin_unit_id, admin_unit.name) - - return api_key_id - def insert_event_custom_widget( self, admin_unit_id, @@ -385,6 +366,7 @@ class Seeder(object): description="Beschreibung", tags="", place_id=None, + planned=False, **kwargs ): from project.models import ( @@ -419,6 +401,9 @@ class Seeder(object): ) event.date_definitions = [date_definition] + if planned: + event.public_status = PublicStatus.planned + if draft: event.public_status = PublicStatus.draft diff --git a/tests/views/test_planing.py b/tests/views/test_planing.py deleted file mode 100644 index b4af6bb..0000000 --- a/tests/views/test_planing.py +++ /dev/null @@ -1,9 +0,0 @@ -def test_list(client, seeder, utils): - user_id, admin_unit_id = seeder.setup_base() - seeder.create_event(admin_unit_id) - - url = utils.get_url("planing") - utils.get_ok(url) - - url = utils.get_url("planing", keyword="name") - utils.get_ok(url) diff --git a/tests/views/test_planning.py b/tests/views/test_planning.py new file mode 100644 index 0000000..7b8cb9a --- /dev/null +++ b/tests/views/test_planning.py @@ -0,0 +1,18 @@ +from tests.seeder import Seeder +from tests.utils import UtilActions + + +def test_list(client, seeder: Seeder, utils: UtilActions): + user_id, admin_unit_id = seeder.setup_base() + seeder.create_event(admin_unit_id) + + url = utils.get_url("planning") + utils.get_ok(url) + + +def test_list_can_not_use_planning(client, seeder: Seeder, utils: UtilActions): + user_id, admin_unit_id = seeder.setup_base(admin_unit_verified=False) + + url = utils.get_url("planning") + response = utils.get(url) + utils.assert_response_permission_missing(response, "manage_admin_units")