Event page edit links #418

This commit is contained in:
Daniel Grams 2023-04-06 22:59:27 +02:00
parent 950c2177ae
commit 8838f053d4
11 changed files with 440 additions and 296 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-04-06 20:34+0200\n"
"POT-Creation-Date: 2023-04-06 22:42+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -208,7 +208,7 @@ msgstr ""
msgid "Legal notice"
msgstr ""
#: project/forms/admin.py:13 project/templates/_macros.html:1401
#: project/forms/admin.py:13 project/templates/_macros.html:1472
#: project/templates/layout.html:302
#: project/templates/widget/event_suggestion/create.html:204
#: project/views/admin_unit.py:73 project/views/root.py:69
@ -247,7 +247,7 @@ msgstr ""
#: project/forms/admin_unit_member.py:11 project/forms/admin_unit_member.py:23
#: project/forms/admin_unit_member.py:28 project/forms/event.py:107
#: project/forms/event_suggestion.py:38 project/forms/organizer.py:27
#: project/templates/_macros.html:237 project/templates/_macros.html:1497
#: project/templates/_macros.html:237 project/templates/_macros.html:1568
#: project/templates/admin/admin.html:27 project/templates/admin/email.html:4
#: project/templates/admin/email.html:66 project/templates/admin/users.html:19
msgid "Email"
@ -378,7 +378,7 @@ msgstr ""
msgid "The short name is used to create a unique identifier for your events"
msgstr ""
#: project/forms/admin_unit.py:41 project/templates/_macros.html:1539
#: project/forms/admin_unit.py:41 project/templates/_macros.html:1610
msgid "Short name must contain only letters numbers or underscore"
msgstr ""
@ -593,16 +593,16 @@ msgstr ""
msgid "All-day"
msgstr ""
#: project/forms/event.py:54 project/templates/_macros.html:1719
#: project/forms/event.py:54 project/templates/_macros.html:1790
#: project/templates/widget/event_suggestion/create.html:240
msgid "Recurring event"
msgstr ""
#: project/forms/event.py:61 project/templates/_macros.html:1258
#: project/forms/event.py:61 project/templates/_macros.html:1329
msgid "The start must be before the end."
msgstr ""
#: project/forms/event.py:67 project/templates/_macros.html:1275
#: project/forms/event.py:67 project/templates/_macros.html:1346
msgid "An event can last a maximum of 14 days."
msgstr ""
@ -814,7 +814,7 @@ 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:438
#: project/templates/_macros.html:601 project/templates/event/create.html:284
#: project/templates/_macros.html:604 project/templates/event/create.html:284
#: project/templates/event/update.html:166
#: project/templates/event_place/create.html:31
#: project/templates/event_place/delete.html:13
@ -834,7 +834,7 @@ msgstr ""
#: project/forms/event.py:302 project/forms/event.py:311
#: project/forms/event.py:376 project/forms/event.py:439
#: project/forms/event_suggestion.py:60 project/templates/_macros.html:475
#: project/templates/_macros.html:638 project/templates/event/create.html:253
#: project/templates/_macros.html:647 project/templates/event/create.html:253
#: project/templates/event/update.html:156
#: project/templates/manage/events.html:87
#: project/templates/organizer/create.html:27
@ -933,7 +933,7 @@ msgstr ""
msgid "Update event"
msgstr ""
#: project/forms/event.py:423 project/templates/_macros.html:1230
#: project/forms/event.py:423 project/templates/_macros.html:1286
#: project/templates/event/actions.html:66
#: project/templates/event/delete.html:6
msgid "Delete event"
@ -1106,7 +1106,7 @@ msgid "Weekdays"
msgstr ""
#: project/forms/reference.py:11 project/forms/reference_request.py:16
#: project/templates/_macros.html:491 project/templates/_macros.html:654
#: project/templates/_macros.html:491 project/templates/_macros.html:664
#: project/templates/admin/delete_admin_unit.html:13
#: project/templates/admin_unit/create.html:28
#: project/templates/admin_unit/update.html:29
@ -1135,7 +1135,7 @@ msgstr ""
msgid "Delete request"
msgstr ""
#: project/forms/reference_request.py:28 project/templates/_macros.html:1413
#: project/forms/reference_request.py:28 project/templates/_macros.html:1484
#: project/templates/event_suggestion/review_status.html:18
#: project/templates/reference_request/review_status.html:12
msgid "Review status"
@ -1256,34 +1256,34 @@ msgstr ""
msgid "Event"
msgstr ""
#: project/templates/_macros.html:393 project/templates/_macros.html:922
#: project/templates/_macros.html:393 project/templates/_macros.html:978
msgid "Date"
msgstr ""
#: project/templates/_macros.html:420 project/templates/_macros.html:579
#: project/templates/_macros.html:1482 project/templates/event/actions.html:51
#: project/templates/_macros.html:1553 project/templates/event/actions.html:51
msgid "Share"
msgstr ""
#: project/templates/_macros.html:424 project/templates/_macros.html:583
#: project/templates/_macros.html:1512
#: project/templates/_macros.html:1583
msgid "Add to calendar"
msgstr ""
#: project/templates/_macros.html:432 project/templates/_macros.html:594
#: project/templates/_macros.html:432 project/templates/_macros.html:597
#: project/templates/event/report.html:4
msgid "Report event"
msgstr ""
#: project/templates/_macros.html:459 project/templates/_macros.html:620
#: project/templates/_macros.html:459 project/templates/_macros.html:630
msgid "Show directions"
msgstr ""
#: project/templates/_macros.html:464 project/templates/_macros.html:625
#: project/templates/_macros.html:464 project/templates/_macros.html:622
msgid "The event takes place online."
msgstr ""
#: project/templates/_macros.html:466 project/templates/_macros.html:627
#: project/templates/_macros.html:466 project/templates/_macros.html:624
msgid "The event takes place both offline and online."
msgstr ""
@ -1292,27 +1292,64 @@ msgstr ""
msgid "Favorite events"
msgstr ""
#: project/templates/_macros.html:681 project/templates/event_date/list.html:5
#: project/templates/_macros.html:590 project/templates/_macros.html:633
#: project/templates/_macros.html:765
#: project/templates/admin/admin_units.html:34
#: project/templates/admin/users.html:34
#: project/templates/manage/events.html:100
#: project/templates/manage/members.html:35
#: project/templates/manage/organizers.html:23
#: project/templates/manage/places.html:27
#: project/templates/manage/references_incoming.html:20
#: project/templates/oauth2_client/list.html:34
#: project/templates/oauth2_client/read.html:17
msgid "Edit"
msgstr ""
#: project/templates/_macros.html:691
msgid "Referenced by"
msgstr ""
#: project/templates/_macros.html:703 project/templates/_macros.html:1296
#: project/templates/event/actions.html:38
#: project/templates/manage/events.html:107
#: project/templates/manage/references_incoming.html:10
msgid "Reference event"
msgstr ""
#: project/templates/_macros.html:712
#: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests"
msgstr ""
#: project/templates/_macros.html:723 project/templates/_macros.html:1293
#: project/templates/event/actions.html:32
#: project/templates/manage/events.html:105
msgid "Request reference"
msgstr ""
#: project/templates/_macros.html:731 project/templates/event_date/list.html:5
#: project/templates/event_date/list.html:299
#: project/templates/reference_request/review.html:32
msgid "Event Dates"
msgstr ""
#: project/templates/_macros.html:773
#: project/templates/_macros.html:829
msgid "Search location on Google"
msgstr ""
#: project/templates/_macros.html:839
#: project/templates/_macros.html:895
#, python-format
msgid "%(count)d event dates"
msgstr ""
#: project/templates/_macros.html:862 project/templates/_macros.html:864
#: project/templates/_macros.html:918 project/templates/_macros.html:920
#: project/templates/event_date/list.html:321
msgid "First"
msgstr ""
#: project/templates/_macros.html:867 project/templates/_macros.html:869
#: project/templates/_macros.html:923 project/templates/_macros.html:925
#: project/templates/event_date/list.html:322
#: project/templates/widget/event_suggestion/create.html:193
#: project/templates/widget/event_suggestion/create.html:218
@ -1323,12 +1360,12 @@ msgstr ""
msgid "Previous"
msgstr ""
#: project/templates/_macros.html:871
#: project/templates/_macros.html:927
#, python-format
msgid "Page %(page)d of %(pages)d (%(total)d total)"
msgstr ""
#: project/templates/_macros.html:873 project/templates/_macros.html:875
#: project/templates/_macros.html:929 project/templates/_macros.html:931
#: project/templates/event_date/list.html:324
#: project/templates/widget/event_suggestion/create.html:194
#: project/templates/widget/event_suggestion/create.html:219
@ -1338,88 +1375,97 @@ msgstr ""
msgid "Next"
msgstr ""
#: project/templates/_macros.html:878 project/templates/_macros.html:880
#: project/templates/_macros.html:934 project/templates/_macros.html:936
#: project/templates/event_date/list.html:325
msgid "Last"
msgstr ""
#: project/templates/_macros.html:945
#: project/templates/_macros.html:1001
msgid "Radius"
msgstr ""
#: project/templates/_macros.html:1159
#: project/templates/_macros.html:1215
msgid "Edit image"
msgstr ""
#: project/templates/_macros.html:1180
#: project/templates/_macros.html:1236
msgid "Close"
msgstr ""
#: project/templates/_macros.html:1181
#: project/templates/_macros.html:1237
msgid "Okay"
msgstr ""
#: project/templates/_macros.html:1193
#: project/templates/_macros.html:1249
msgid "Choose image file"
msgstr ""
#: project/templates/_macros.html:1229 project/templates/event/actions.html:65
#: project/templates/_macros.html:1285 project/templates/event/actions.html:65
#: project/templates/event/delete.html:12
msgid "Edit event"
msgstr ""
#: project/templates/_macros.html:1232 project/templates/manage/events.html:114
#: project/templates/_macros.html:1289 project/templates/event/actions.html:58
msgid "Duplicate event"
msgstr ""
#: project/templates/_macros.html:1300 project/templates/event/actions.html:44
#: project/templates/manage/events.html:111
msgid "Add to list"
msgstr ""
#: project/templates/_macros.html:1303 project/templates/manage/events.html:114
msgid "More"
msgstr ""
#: project/templates/_macros.html:1279
#: project/templates/_macros.html:1350
msgid "Please enter a valid time, between 00:00 and 23:59."
msgstr ""
#: project/templates/_macros.html:1307
#: project/templates/_macros.html:1378
#, python-format
msgid "Just use %(term)s"
msgstr ""
#: project/templates/_macros.html:1373
#: project/templates/_macros.html:1444
msgid "Event suggestion"
msgstr ""
#: project/templates/_macros.html:1491
#: project/templates/_macros.html:1562
msgid "Link copied"
msgstr ""
#: project/templates/_macros.html:1491
#: project/templates/_macros.html:1562
msgid "Copy link"
msgstr ""
#: project/templates/_macros.html:1521
#: project/templates/_macros.html:1592
msgid "Google calendar"
msgstr ""
#: project/templates/_macros.html:1523
#: project/templates/_macros.html:1594
msgid "Apple calendar"
msgstr ""
#: project/templates/_macros.html:1524
#: project/templates/_macros.html:1595
msgid "Yahoo calendar"
msgstr ""
#: project/templates/_macros.html:1525
#: project/templates/_macros.html:1596
msgid "Other calendar"
msgstr ""
#: project/templates/_macros.html:1720
#: project/templates/_macros.html:1791
msgid "Remove event date"
msgstr ""
#: project/templates/_macros.html:1749 project/templates/event/create.html:176
#: project/templates/_macros.html:1820 project/templates/event/create.html:176
#: project/templates/event/update.html:99
#: project/templates/widget/event_suggestion/create.html:129
msgid "Enter organizer"
msgstr ""
#: project/templates/_macros.html:1773
#: project/templates/_macros.html:1844
msgid "Enter list name"
msgstr ""
@ -1620,18 +1666,6 @@ msgstr ""
msgid "View"
msgstr ""
#: project/templates/admin/admin_units.html:34
#: project/templates/admin/users.html:34
#: project/templates/manage/events.html:100
#: project/templates/manage/members.html:35
#: project/templates/manage/organizers.html:23
#: project/templates/manage/places.html:27
#: project/templates/manage/references_incoming.html:20
#: project/templates/oauth2_client/list.html:34
#: project/templates/oauth2_client/read.html:17
msgid "Edit"
msgstr ""
#: project/templates/admin/admin_units.html:35
#: project/templates/admin/users.html:35
#: project/templates/manage/events.html:101
@ -1793,40 +1827,20 @@ msgstr ""
msgid "Actions for event"
msgstr ""
#: project/templates/event/actions.html:32
#: project/templates/manage/events.html:105
msgid "Request reference"
msgstr ""
#: project/templates/event/actions.html:33
#: project/templates/event/reference_request.html:10
msgid "Ask another organization to reference your event on their calendar."
msgstr ""
#: project/templates/event/actions.html:38
#: project/templates/manage/events.html:107
#: project/templates/manage/references_incoming.html:10
msgid "Reference event"
msgstr ""
#: project/templates/event/actions.html:39
#: project/templates/event/reference.html:9
msgid "Reference this event on your organization's calendar."
msgstr ""
#: project/templates/event/actions.html:44
#: project/templates/manage/events.html:111
msgid "Add to list"
msgstr ""
#: project/templates/event/actions.html:45
msgid "Add this event to a list of your organization."
msgstr ""
#: project/templates/event/actions.html:58
msgid "Duplicate event"
msgstr ""
#: project/templates/event/actions.html:61
#, python-format
msgid "Create another event for %(admin_unit_name)s"
@ -1837,7 +1851,8 @@ msgstr ""
msgid "List all events of %(admin_unit_name)s"
msgstr ""
#: project/templates/event/actions.html:74
#: project/templates/event/actions.html:74 project/templates/event/read.html:32
#: project/templates/event_date/read.html:34
#: project/templates/manage/events.html:131
msgid "Add event to list"
msgstr ""
@ -1979,11 +1994,6 @@ msgstr ""
msgid "Assistents"
msgstr ""
#: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests"
msgstr ""
#: project/templates/manage/reference_requests_incoming.html:19
msgid "Review request"
msgstr ""
@ -2234,11 +2244,11 @@ msgstr ""
msgid "Event successfully deleted"
msgstr ""
#: project/views/event.py:413
#: project/views/event.py:408
msgid "Referenced event changed"
msgstr ""
#: project/views/event.py:436
#: project/views/event.py:431
msgid "New event report"
msgstr ""

View File

@ -525,7 +525,7 @@
{{ render_fax_prop(organizer.fax) }}
{% endmacro %}
{% macro render_event_props_seo(event, start, end, allday, dates = None, show_rating = False, show_admin_unit = True, user_rights=None, share_links=None, calendar_links=None, current_user=None) %}
{% macro render_event_props_seo(event, start, end, allday, dates = None, show_rating = False, show_admin_unit = True, user_rights=None, share_links=None, calendar_links=None, current_user=None, can_add_to_list=False) %}
<div class="w-normal mx-auto">
{% if event.photo_id %}
@ -536,7 +536,7 @@
{% if user_rights %}
<div class="float-sm-right">
{{ render_event_menu(user_rights, event) }}
{{ render_event_menu(user_rights, event, can_add_to_list) }}
</div>
{% endif %}
@ -586,6 +586,9 @@
{% if current_user and current_user.is_authenticated %}
<button type="button" class="btn btn-outline-secondary mb-1 toggle-user-event-favorite" data-event-id="{{ event.id }}"><i class="{%if event.is_favored_by_current_user() %}fa{% else %}far{% endif %} fa-bookmark"></i> {{ _('Favorite events') }}</button>
{% endif %}
{% if user_rights['can_update_event'] %}
<a href="{{ url_for('event_update', event_id=event.id) }}" class="btn btn-outline-secondary mb-1"><i class="fa fa-edit"></i> {{ _('Edit') }}</a>
{% endif %}
</div>
{% endif %}
@ -615,17 +618,23 @@
{{ render_link_prop(event.event_place.url) }}
{{ render_location_prop(event.event_place.location) }}
{% if event.attendance_mode and event.attendance_mode.value != 2 %}
<div class="mt-2">
<a href="http://www.google.com/maps?q={{ render_place(event.event_place) | quote_plus }}" class="btn btn-outline-secondary" target="_blank" rel="noopener noreferrer"><i class="fa fa-directions"></i> {{ _('Show directions') }}</a>
</div>
{% endif %}
{% if event.attendance_mode and event.attendance_mode.value == 2 %}
<div class="mt-2">{{ _('The event takes place online.') }}</div>
{% elif event.attendance_mode and event.attendance_mode.value == 3 %}
<div class="mt-2">{{ _('The event takes place both offline and online.') }}</div>
{% endif %}
{% if (event.attendance_mode and event.attendance_mode.value != 2) or user_rights['can_update_event'] %}
<div class="mt-2">
{% if event.attendance_mode and event.attendance_mode.value != 2 %}
<a href="http://www.google.com/maps?q={{ render_place(event.event_place) | quote_plus }}" class="btn btn-outline-secondary mr-1" target="_blank" rel="noopener noreferrer"><i class="fa fa-directions"></i> {{ _('Show directions') }}</a>
{% endif %}
{% if user_rights['can_update_event'] %}
<a href="{{ url_for('event_place_update', id=event.event_place.id) }}" class="btn btn-outline-secondary"><i class="fa fa-edit"></i> {{ _('Edit') }}</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
@ -637,12 +646,13 @@
<div class="card-body">
<h2 class="mt-0">{{ _('Organizer') }}</h2>
{{ render_event_props_seo_organizer(event.organizer) }}
{{ render_event_props_seo_organizer(event.organizer, user_rights) }}
{% for co_organizer in event.co_organizers %}
<div{% if loop.index > 0 %} class="mt-4"{% endif %}>
{{ render_event_props_seo_organizer(co_organizer) }}
{{ render_event_props_seo_organizer(co_organizer, user_rights) }}
</div>
{% endfor %}
</div>
</div>
@ -675,16 +685,57 @@
</div>
{% endif %}
{% if dates and dates|length > 0 %}
<div class="card mb-3">
<div class="card-body pb-0">
<h2 class="mt-0"><a name="event-dates">{{ _('Event Dates') }}</a></div>
<div class="list-group list-group-flush mb-4" style="max-height: 30vh; overflow: scroll; overflow-y: auto;">
{% for date in dates %}
<a href="{{ url_for('event_date', id=date.id) }}" class="list-group-item">{{ render_event_date(date.start, date.end, date.allday) }}</a>
{% endfor %}
</div>
{% if user_rights['can_reference_event'] or (event.references and event.references|length > 0) %}
<div class="card mb-3">
<div class="card-body pb-0">
<h2 class="mt-0"><a name="event-dates">{{ _('Referenced by') }}</a>
</div>
<div class="list-group list-group-flush mb-4" style="max-height: 30vh; overflow: scroll; overflow-y: auto;">
{% for event_reference in event.references %}
<span class="list-group-item">
<a href="{{ url_for('organizations', path=event_reference.admin_unit.id) }}">{{ event_reference.admin_unit.name }}</a>
{{ render_admin_unit_badges(event_reference.admin_unit) }}
</span>
{% endfor %}
</div>
{% if user_rights['can_reference_event'] %}
<div class="ml-3 mb-3">
<a href="{{ url_for('event_reference_create', event_id=event.id) }}" class="btn btn-outline-secondary"><i class="fa fa-link"></i> {{ _('Reference event') }}</a>
</div>
{% endif %}
</div>
{% endif %}
{% if user_rights['can_create_reference_request'] %}
<div class="card mb-3">
<div class="card-body pb-0">
<h2 class="mt-0"><a name="event-dates">{{ _('Reference requests') }}</a>
</div>
<div class="list-group list-group-flush mb-4" style="max-height: 30vh; overflow: scroll; overflow-y: auto;">
{% for reference_request in event.reference_requests %}
<span class="list-group-item">
<a href="{{ url_for('event_reference_request_review_status', id=reference_request.id) }}">{{ reference_request.admin_unit.name }}</a>
{{ render_reference_request_review_status_pill(reference_request) }}
</span>
{% endfor %}
</div>
<div class="ml-3 mb-3">
<a href="{{ url_for('event_reference_request_create', event_id=event.id) }}" class="btn btn-outline-secondary"><i class="fa fa-link"></i> {{ _('Request reference') }}</a>
</div>
</div>
{% endif %}
{% if dates and dates|length > 0 %}
<div class="card mb-3">
<div class="card-body pb-0">
<h2 class="mt-0"><a name="event-dates">{{ _('Event Dates') }}</a>
</div>
<div class="list-group list-group-flush mb-4" style="max-height: 30vh; overflow: scroll; overflow-y: auto;">
{% for date in dates %}
<a href="{{ url_for('event_date', id=date.id) }}" class="list-group-item">{{ render_event_date(date.start, date.end, date.allday) }}</a>
{% endfor %}
</div>
</div>
{% endif %}
</div>
@ -692,7 +743,7 @@
{% endmacro %}
{% macro render_event_props_seo_organizer(organizer) %}
{% macro render_event_props_seo_organizer(organizer, user_rights) %}
<div class="row">
{% if organizer.logo_id %}
<div class="col-12 col-sm-auto order-sm-last">{{ render_logo(organizer.logo) }}</div>
@ -709,6 +760,11 @@
{{ render_fax_prop(organizer.fax) }}
</div>
</div>
{% if user_rights['can_update_event'] %}
<div class="mt-2">
<a href="{{ url_for('organizer_update', id=organizer.id) }}" class="btn btn-outline-secondary"><i class="fa fa-edit"></i> {{ _('Edit') }}</a>
</div>
{% endif %}
{% endmacro %}
{% macro render_google_place_autocomplete_header() %}
@ -1218,7 +1274,7 @@ if (URL) {
</div>
{% endmacro %}
{% macro render_event_menu(user_rights, event) %}
{% macro render_event_menu(user_rights, event, can_add_to_list) %}
{% if user_rights|any_dict_value_true %}
<div class="dropdown my-1">
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -1229,6 +1285,21 @@ if (URL) {
<a class="dropdown-item" href="{{ url_for('event_update', event_id=event.id) }}"><i class="fa fa-edit"></i> {{ _('Edit event') }}</a>
<a class="dropdown-item" href="{{ url_for('event_delete', event_id=event.id) }}"><i class="fa fa-trash"></i> {{ _('Delete event') }}&hellip;</a>
{% endif %}
{% if user_rights['can_duplicate_event'] %}
<a class="dropdown-item" href="{{ url_for('event_create_for_admin_unit_id', id=event.admin_unit_id, template_id=event.id) }}"><i class="fa fa-copy"></i> {{ _('Duplicate event') }}</a>
{% endif %}
<div class="dropdown-divider"></div>
{% if user_rights['can_create_reference_request'] %}
<a class="dropdown-item" href="{{ url_for('event_reference_request_create', event_id=event.id) }}"><i class="fa fa-link"></i> {{ _('Request reference') }}</a>
{% endif %}
{% if user_rights['can_reference_event'] %}
<a class="dropdown-item" href="{{ url_for('event_reference_create', event_id=event.id) }}"><i class="fa fa-link"></i> {{ _('Reference event') }}</a>
{% endif %}
{% if can_add_to_list %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" onclick="app.$bvModal.show('add-event-to-list-modal'); return false;" href="#"><i class="fa fa-plus-circle"></i> {{ _('Add to list') }}</a>
{% endif %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ url_for('event_actions', event_id=event.id) }}">{{ _('More') }}&hellip;</a>
</div>
</div>

View File

@ -1,14 +1,38 @@
{% extends "layout.html" %}
{% extends "layout_vue.html" %}
{% from "_macros.html" import render_event_props_seo %}
{%- block title -%}
{{ event.name }}
{%- endblock -%}
{% block component_scripts %}
<script src="{{ url_for('static', filename='vue/event-lists/add-event.vue.js')}}"></script>
{% endblock %}
{% block component_definitions %}
Vue.component("EventListAddEvent", EventListAddEvent);
{% endblock %}
{% block vue_container %}
{% endblock %}
{% block header_before_site_js %}
<script src="{{ url_for('static', filename='user.js')}}"></script>
{{ super() }}
{%- endblock -%}
{% block content_container_attribs %}{% endblock %}
{% block content %}
{% set can_add_to_list = current_admin_unit and has_access(current_admin_unit, "admin_unit:update")%}
{{ render_event_props_seo(event, event.min_start_definition.start, event.min_start_definition.end, event.min_start_definition.allday, dates, user_rights['can_update_event'], user_rights=user_rights, share_links=share_links, calendar_links=calendar_links, current_user=current_user, can_add_to_list=can_add_to_list) }}
{{ render_event_props_seo(event, event.min_start_definition.start, event.min_start_definition.end, event.min_start_definition.allday, dates, user_rights['can_update_event'], user_rights=user_rights, share_links=share_links, calendar_links=calendar_links, current_user=current_user) }}
<div id="vue-container">
{% if can_add_to_list %}
<b-modal id="add-event-to-list-modal" title="{{ _('Add event to list') }}" ok-only>
<event-list-add-event event-id="{{ event.id }}" organization-id="{{ current_admin_unit.id }}" />
</b-modal>
{% endif %}
</div>
{{ super() }}
{% endblock %}

View File

@ -1,15 +1,40 @@
{% extends "layout.html" %}
{% extends "layout_vue.html" %}
{% from "_macros.html" import render_event_props_seo %}
{% set event = event_date.event %}
{%- block title -%}
{{ meta['title'] }}
{%- endblock -%}
{% block component_scripts %}
<script src="{{ url_for('static', filename='vue/event-lists/add-event.vue.js')}}"></script>
{% endblock %}
{% block component_definitions %}
Vue.component("EventListAddEvent", EventListAddEvent);
{% endblock %}
{% block vue_container %}
{% endblock %}
{% block header_before_site_js %}
<script src="{{ url_for('static', filename='user.js')}}"></script>
{{ super() }}
{%- endblock -%}
{% block content_container_attribs %}{% endblock %}
{% block content %}
{% set can_add_to_list = current_admin_unit and has_access(current_admin_unit, "admin_unit:update")%}
{{ render_event_props_seo(event, event_date.start, event_date.end, event_date.allday, dates, user_rights=user_rights, share_links=share_links, calendar_links=calendar_links, current_user=current_user, can_add_to_list=can_add_to_list) }}
{{ render_event_props_seo(event, event_date.start, event_date.end, event_date.allday, dates, user_rights=user_rights, share_links=share_links, calendar_links=calendar_links, current_user=current_user) }}
<div id="vue-container">
{% if can_add_to_list %}
<b-modal id="add-event-to-list-modal" title="{{ _('Add event to list') }}" ok-only>
<event-list-add-event event-id="{{ event.id }}" organization-id="{{ current_admin_unit.id }}" />
</b-modal>
{% endif %}
</div>
{{ super() }}
{% endblock %}

View File

@ -115,8 +115,8 @@ var vue_app_data = { eventId: 0 };
</div>
{{ render_event_warning_pills(event) }}
</td>
<td>{{ event.organizer.name }}</td>
<td>{{ event.event_place.name }}</td>
<td><a href="{{ url_for('organizer_update', id=event.organizer.id) }}" class="text-body">{{ event.organizer.name }}</a></td>
<td><a href="{{ url_for('event_place_update', id=event.event_place.id) }}" class="text-body">{{ event.event_place.name }}</a></td>
<td class="fit">{{ event.references|length }}/{{ event.reference_requests|length }}</td>
</tr>
{% endfor %}

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-04-06 20:34+0200\n"
"POT-Creation-Date: 2023-04-06 22:42+0200\n"
"PO-Revision-Date: 2020-06-07 18:51+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@ -209,7 +209,7 @@ msgstr "Nutzungsbedingungen"
msgid "Legal notice"
msgstr "Impressum"
#: project/forms/admin.py:13 project/templates/_macros.html:1401
#: project/forms/admin.py:13 project/templates/_macros.html:1472
#: project/templates/layout.html:302
#: project/templates/widget/event_suggestion/create.html:204
#: project/views/admin_unit.py:73 project/views/root.py:69
@ -248,7 +248,7 @@ msgstr "Nutzer löschen"
#: project/forms/admin_unit_member.py:11 project/forms/admin_unit_member.py:23
#: project/forms/admin_unit_member.py:28 project/forms/event.py:107
#: project/forms/event_suggestion.py:38 project/forms/organizer.py:27
#: project/templates/_macros.html:237 project/templates/_macros.html:1497
#: project/templates/_macros.html:237 project/templates/_macros.html:1568
#: project/templates/admin/admin.html:27 project/templates/admin/email.html:4
#: project/templates/admin/email.html:66 project/templates/admin/users.html:19
msgid "Email"
@ -390,7 +390,7 @@ msgstr ""
"eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern "
"und Unterstriche enthalten."
#: project/forms/admin_unit.py:41 project/templates/_macros.html:1539
#: project/forms/admin_unit.py:41 project/templates/_macros.html:1610
msgid "Short name must contain only letters numbers or underscore"
msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten"
@ -616,16 +616,16 @@ msgstr "Gib an, wann der Termin endet. Ein Termin darf maximal 14 Tage dauern."
msgid "All-day"
msgstr "Ganztägig"
#: project/forms/event.py:54 project/templates/_macros.html:1719
#: project/forms/event.py:54 project/templates/_macros.html:1790
#: project/templates/widget/event_suggestion/create.html:240
msgid "Recurring event"
msgstr "Serientermin"
#: project/forms/event.py:61 project/templates/_macros.html:1258
#: project/forms/event.py:61 project/templates/_macros.html:1329
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:1275
#: project/forms/event.py:67 project/templates/_macros.html:1346
msgid "An event can last a maximum of 14 days."
msgstr "Eine Veranstaltung darf maximal 14 Tage dauern."
@ -854,7 +854,7 @@ 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:438
#: project/templates/_macros.html:601 project/templates/event/create.html:284
#: project/templates/_macros.html:604 project/templates/event/create.html:284
#: project/templates/event/update.html:166
#: project/templates/event_place/create.html:31
#: project/templates/event_place/delete.html:13
@ -874,7 +874,7 @@ 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_suggestion.py:60 project/templates/_macros.html:475
#: project/templates/_macros.html:638 project/templates/event/create.html:253
#: project/templates/_macros.html:647 project/templates/event/create.html:253
#: project/templates/event/update.html:156
#: project/templates/manage/events.html:87
#: project/templates/organizer/create.html:27
@ -977,7 +977,7 @@ msgstr "Wähle den öffentlichen Status der Veranstaltung."
msgid "Update event"
msgstr "Veranstaltung aktualisieren"
#: project/forms/event.py:423 project/templates/_macros.html:1230
#: project/forms/event.py:423 project/templates/_macros.html:1286
#: project/templates/event/actions.html:66
#: project/templates/event/delete.html:6
msgid "Delete event"
@ -1154,7 +1154,7 @@ msgid "Weekdays"
msgstr "Wochentage"
#: project/forms/reference.py:11 project/forms/reference_request.py:16
#: project/templates/_macros.html:491 project/templates/_macros.html:654
#: project/templates/_macros.html:491 project/templates/_macros.html:664
#: project/templates/admin/delete_admin_unit.html:13
#: project/templates/admin_unit/create.html:28
#: project/templates/admin_unit/update.html:29
@ -1183,7 +1183,7 @@ msgstr "Anfrage speichern"
msgid "Delete request"
msgstr "Anfrage löschen"
#: project/forms/reference_request.py:28 project/templates/_macros.html:1413
#: project/forms/reference_request.py:28 project/templates/_macros.html:1484
#: project/templates/event_suggestion/review_status.html:18
#: project/templates/reference_request/review_status.html:12
msgid "Review status"
@ -1311,34 +1311,34 @@ msgstr "Zuletzt aktualisiert am %(updated_at)s."
msgid "Event"
msgstr "Veranstaltung"
#: project/templates/_macros.html:393 project/templates/_macros.html:922
#: project/templates/_macros.html:393 project/templates/_macros.html:978
msgid "Date"
msgstr "Datum"
#: project/templates/_macros.html:420 project/templates/_macros.html:579
#: project/templates/_macros.html:1482 project/templates/event/actions.html:51
#: project/templates/_macros.html:1553 project/templates/event/actions.html:51
msgid "Share"
msgstr "Teilen"
#: project/templates/_macros.html:424 project/templates/_macros.html:583
#: project/templates/_macros.html:1512
#: project/templates/_macros.html:1583
msgid "Add to calendar"
msgstr "Zum Kalender"
#: project/templates/_macros.html:432 project/templates/_macros.html:594
#: project/templates/_macros.html:432 project/templates/_macros.html:597
#: project/templates/event/report.html:4
msgid "Report event"
msgstr "Veranstaltung melden"
#: project/templates/_macros.html:459 project/templates/_macros.html:620
#: project/templates/_macros.html:459 project/templates/_macros.html:630
msgid "Show directions"
msgstr "Anreise planen"
#: project/templates/_macros.html:464 project/templates/_macros.html:625
#: project/templates/_macros.html:464 project/templates/_macros.html:622
msgid "The event takes place online."
msgstr "Die Veranstaltung findet online statt."
#: project/templates/_macros.html:466 project/templates/_macros.html:627
#: project/templates/_macros.html:466 project/templates/_macros.html:624
msgid "The event takes place both offline and online."
msgstr ""
"Die Veranstaltung findet sowohl als Präsenzveranstaltung als auch online "
@ -1349,27 +1349,64 @@ msgstr ""
msgid "Favorite events"
msgstr "Merkzettel"
#: project/templates/_macros.html:681 project/templates/event_date/list.html:5
#: project/templates/_macros.html:590 project/templates/_macros.html:633
#: project/templates/_macros.html:765
#: project/templates/admin/admin_units.html:34
#: project/templates/admin/users.html:34
#: project/templates/manage/events.html:100
#: project/templates/manage/members.html:35
#: project/templates/manage/organizers.html:23
#: project/templates/manage/places.html:27
#: project/templates/manage/references_incoming.html:20
#: project/templates/oauth2_client/list.html:34
#: project/templates/oauth2_client/read.html:17
msgid "Edit"
msgstr "Bearbeiten"
#: project/templates/_macros.html:691
msgid "Referenced by"
msgstr "Empfohlen von"
#: project/templates/_macros.html:703 project/templates/_macros.html:1296
#: project/templates/event/actions.html:38
#: project/templates/manage/events.html:107
#: project/templates/manage/references_incoming.html:10
msgid "Reference event"
msgstr "Veranstaltung empfehlen"
#: project/templates/_macros.html:712
#: 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:723 project/templates/_macros.html:1293
#: project/templates/event/actions.html:32
#: project/templates/manage/events.html:105
msgid "Request reference"
msgstr "Empfehlung anfragen"
#: project/templates/_macros.html:731 project/templates/event_date/list.html:5
#: project/templates/event_date/list.html:299
#: project/templates/reference_request/review.html:32
msgid "Event Dates"
msgstr "Termine"
#: project/templates/_macros.html:773
#: project/templates/_macros.html:829
msgid "Search location on Google"
msgstr "Ort bei Google suchen"
#: project/templates/_macros.html:839
#: project/templates/_macros.html:895
#, python-format
msgid "%(count)d event dates"
msgstr "%(count)d Termine"
#: project/templates/_macros.html:862 project/templates/_macros.html:864
#: project/templates/_macros.html:918 project/templates/_macros.html:920
#: project/templates/event_date/list.html:321
msgid "First"
msgstr "Letzte"
#: project/templates/_macros.html:867 project/templates/_macros.html:869
#: project/templates/_macros.html:923 project/templates/_macros.html:925
#: project/templates/event_date/list.html:322
#: project/templates/widget/event_suggestion/create.html:193
#: project/templates/widget/event_suggestion/create.html:218
@ -1380,12 +1417,12 @@ msgstr "Letzte"
msgid "Previous"
msgstr "Zurück"
#: project/templates/_macros.html:871
#: project/templates/_macros.html:927
#, 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:873 project/templates/_macros.html:875
#: project/templates/_macros.html:929 project/templates/_macros.html:931
#: project/templates/event_date/list.html:324
#: project/templates/widget/event_suggestion/create.html:194
#: project/templates/widget/event_suggestion/create.html:219
@ -1395,88 +1432,97 @@ msgstr "Seite %(page)d von %(pages)d (%(total)d insgesamt)"
msgid "Next"
msgstr "Weiter"
#: project/templates/_macros.html:878 project/templates/_macros.html:880
#: project/templates/_macros.html:934 project/templates/_macros.html:936
#: project/templates/event_date/list.html:325
msgid "Last"
msgstr "Erste"
#: project/templates/_macros.html:945
#: project/templates/_macros.html:1001
msgid "Radius"
msgstr "Umkreis"
#: project/templates/_macros.html:1159
#: project/templates/_macros.html:1215
msgid "Edit image"
msgstr "Bild bearbeiten"
#: project/templates/_macros.html:1180
#: project/templates/_macros.html:1236
msgid "Close"
msgstr "Schließen"
#: project/templates/_macros.html:1181
#: project/templates/_macros.html:1237
msgid "Okay"
msgstr "OK"
#: project/templates/_macros.html:1193
#: project/templates/_macros.html:1249
msgid "Choose image file"
msgstr "Bild-Datei auswählen"
#: project/templates/_macros.html:1229 project/templates/event/actions.html:65
#: project/templates/_macros.html:1285 project/templates/event/actions.html:65
#: project/templates/event/delete.html:12
msgid "Edit event"
msgstr "Veranstaltung bearbeiten"
#: project/templates/_macros.html:1232 project/templates/manage/events.html:114
#: project/templates/_macros.html:1289 project/templates/event/actions.html:58
msgid "Duplicate event"
msgstr "Veranstaltung duplizieren"
#: project/templates/_macros.html:1300 project/templates/event/actions.html:44
#: project/templates/manage/events.html:111
msgid "Add to list"
msgstr "Zu Liste hinzufügen"
#: project/templates/_macros.html:1303 project/templates/manage/events.html:114
msgid "More"
msgstr "Mehr"
#: project/templates/_macros.html:1279
#: project/templates/_macros.html:1350
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:1307
#: project/templates/_macros.html:1378
#, python-format
msgid "Just use %(term)s"
msgstr "Verwende einfach %(term)s"
#: project/templates/_macros.html:1373
#: project/templates/_macros.html:1444
msgid "Event suggestion"
msgstr "Veranstaltungsvorschlag"
#: project/templates/_macros.html:1491
#: project/templates/_macros.html:1562
msgid "Link copied"
msgstr "Link kopiert"
#: project/templates/_macros.html:1491
#: project/templates/_macros.html:1562
msgid "Copy link"
msgstr "Link kopieren"
#: project/templates/_macros.html:1521
#: project/templates/_macros.html:1592
msgid "Google calendar"
msgstr "Google Kalender"
#: project/templates/_macros.html:1523
#: project/templates/_macros.html:1594
msgid "Apple calendar"
msgstr "Apple Kalender"
#: project/templates/_macros.html:1524
#: project/templates/_macros.html:1595
msgid "Yahoo calendar"
msgstr "Yahoo Kalender"
#: project/templates/_macros.html:1525
#: project/templates/_macros.html:1596
msgid "Other calendar"
msgstr "Anderer Kalender"
#: project/templates/_macros.html:1720
#: project/templates/_macros.html:1791
msgid "Remove event date"
msgstr "Termin entfernen"
#: project/templates/_macros.html:1749 project/templates/event/create.html:176
#: project/templates/_macros.html:1820 project/templates/event/create.html:176
#: project/templates/event/update.html:99
#: project/templates/widget/event_suggestion/create.html:129
msgid "Enter organizer"
msgstr "Veranstalter eingeben"
#: project/templates/_macros.html:1773
#: project/templates/_macros.html:1844
msgid "Enter list name"
msgstr "Listenname eingeben"
@ -1677,18 +1723,6 @@ msgstr "Nutzer"
msgid "View"
msgstr "Anzeigen"
#: project/templates/admin/admin_units.html:34
#: project/templates/admin/users.html:34
#: project/templates/manage/events.html:100
#: project/templates/manage/members.html:35
#: project/templates/manage/organizers.html:23
#: project/templates/manage/places.html:27
#: project/templates/manage/references_incoming.html:20
#: project/templates/oauth2_client/list.html:34
#: project/templates/oauth2_client/read.html:17
msgid "Edit"
msgstr "Bearbeiten"
#: project/templates/admin/admin_units.html:35
#: project/templates/admin/users.html:35
#: project/templates/manage/events.html:101
@ -1852,11 +1886,6 @@ msgstr "Klicke hier, um die Seite zu öffnen"
msgid "Actions for event"
msgstr "Aktionen für die Veranstaltung"
#: project/templates/event/actions.html:32
#: project/templates/manage/events.html:105
msgid "Request reference"
msgstr "Empfehlung anfragen"
#: project/templates/event/actions.html:33
#: project/templates/event/reference_request.html:10
msgid "Ask another organization to reference your event on their calendar."
@ -1864,30 +1893,15 @@ msgstr ""
"Bitte eine andere Organisation, deine Veranstaltung in ihrem Kalender zu "
"empfehlen."
#: project/templates/event/actions.html:38
#: project/templates/manage/events.html:107
#: project/templates/manage/references_incoming.html:10
msgid "Reference event"
msgstr "Veranstaltung empfehlen"
#: project/templates/event/actions.html:39
#: project/templates/event/reference.html:9
msgid "Reference this event on your organization's calendar."
msgstr "Empfehle diese Veranstaltung im Kalender deiner Organisation."
#: project/templates/event/actions.html:44
#: project/templates/manage/events.html:111
msgid "Add to list"
msgstr "Zu Liste hinzufügen"
#: project/templates/event/actions.html:45
msgid "Add this event to a list of your organization."
msgstr "Füge diese Veranstaltung zu einer Liste deiner Organisation hinzu."
#: project/templates/event/actions.html:58
msgid "Duplicate event"
msgstr "Veranstaltung duplizieren"
#: project/templates/event/actions.html:61
#, python-format
msgid "Create another event for %(admin_unit_name)s"
@ -1898,7 +1912,8 @@ msgstr "Erstelle eine weitere Veranstaltung für %(admin_unit_name)s"
msgid "List all events of %(admin_unit_name)s"
msgstr "Zeige alle Veranstaltungen von %(admin_unit_name)s"
#: project/templates/event/actions.html:74
#: project/templates/event/actions.html:74 project/templates/event/read.html:32
#: project/templates/event_date/read.html:34
#: project/templates/manage/events.html:131
msgid "Add event to list"
msgstr "Veranstaltung zu Liste hinzufügen"
@ -2045,11 +2060,6 @@ msgstr "Duplizieren"
msgid "Assistents"
msgstr "Assistenten"
#: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests"
msgstr "Empfehlungsanfragen"
#: project/templates/manage/reference_requests_incoming.html:19
msgid "Review request"
msgstr "Anfrage prüfen"
@ -2305,11 +2315,11 @@ msgstr "Veranstaltung erfolgreich aktualisiert"
msgid "Event successfully deleted"
msgstr "Veranstaltung erfolgreich gelöscht"
#: project/views/event.py:413
#: project/views/event.py:408
msgid "Referenced event changed"
msgstr "Empfohlene Veranstaltung wurde geändert"
#: project/views/event.py:436
#: project/views/event.py:431
msgid "New event report"
msgstr "Neue Meldung zu einer Veranstaltung"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-04-06 20:34+0200\n"
"POT-Creation-Date: 2023-04-06 22:42+0200\n"
"PO-Revision-Date: 2021-04-30 15:04+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
@ -209,7 +209,7 @@ msgstr ""
msgid "Legal notice"
msgstr ""
#: project/forms/admin.py:13 project/templates/_macros.html:1401
#: project/forms/admin.py:13 project/templates/_macros.html:1472
#: project/templates/layout.html:302
#: project/templates/widget/event_suggestion/create.html:204
#: project/views/admin_unit.py:73 project/views/root.py:69
@ -248,7 +248,7 @@ msgstr ""
#: project/forms/admin_unit_member.py:11 project/forms/admin_unit_member.py:23
#: project/forms/admin_unit_member.py:28 project/forms/event.py:107
#: project/forms/event_suggestion.py:38 project/forms/organizer.py:27
#: project/templates/_macros.html:237 project/templates/_macros.html:1497
#: project/templates/_macros.html:237 project/templates/_macros.html:1568
#: project/templates/admin/admin.html:27 project/templates/admin/email.html:4
#: project/templates/admin/email.html:66 project/templates/admin/users.html:19
msgid "Email"
@ -379,7 +379,7 @@ msgstr ""
msgid "The short name is used to create a unique identifier for your events"
msgstr ""
#: project/forms/admin_unit.py:41 project/templates/_macros.html:1539
#: project/forms/admin_unit.py:41 project/templates/_macros.html:1610
msgid "Short name must contain only letters numbers or underscore"
msgstr ""
@ -594,16 +594,16 @@ msgstr ""
msgid "All-day"
msgstr ""
#: project/forms/event.py:54 project/templates/_macros.html:1719
#: project/forms/event.py:54 project/templates/_macros.html:1790
#: project/templates/widget/event_suggestion/create.html:240
msgid "Recurring event"
msgstr ""
#: project/forms/event.py:61 project/templates/_macros.html:1258
#: project/forms/event.py:61 project/templates/_macros.html:1329
msgid "The start must be before the end."
msgstr ""
#: project/forms/event.py:67 project/templates/_macros.html:1275
#: project/forms/event.py:67 project/templates/_macros.html:1346
msgid "An event can last a maximum of 14 days."
msgstr ""
@ -815,7 +815,7 @@ 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:438
#: project/templates/_macros.html:601 project/templates/event/create.html:284
#: project/templates/_macros.html:604 project/templates/event/create.html:284
#: project/templates/event/update.html:166
#: project/templates/event_place/create.html:31
#: project/templates/event_place/delete.html:13
@ -835,7 +835,7 @@ msgstr ""
#: project/forms/event.py:302 project/forms/event.py:311
#: project/forms/event.py:376 project/forms/event.py:439
#: project/forms/event_suggestion.py:60 project/templates/_macros.html:475
#: project/templates/_macros.html:638 project/templates/event/create.html:253
#: project/templates/_macros.html:647 project/templates/event/create.html:253
#: project/templates/event/update.html:156
#: project/templates/manage/events.html:87
#: project/templates/organizer/create.html:27
@ -934,7 +934,7 @@ msgstr ""
msgid "Update event"
msgstr ""
#: project/forms/event.py:423 project/templates/_macros.html:1230
#: project/forms/event.py:423 project/templates/_macros.html:1286
#: project/templates/event/actions.html:66
#: project/templates/event/delete.html:6
msgid "Delete event"
@ -1107,7 +1107,7 @@ msgid "Weekdays"
msgstr ""
#: project/forms/reference.py:11 project/forms/reference_request.py:16
#: project/templates/_macros.html:491 project/templates/_macros.html:654
#: project/templates/_macros.html:491 project/templates/_macros.html:664
#: project/templates/admin/delete_admin_unit.html:13
#: project/templates/admin_unit/create.html:28
#: project/templates/admin_unit/update.html:29
@ -1136,7 +1136,7 @@ msgstr ""
msgid "Delete request"
msgstr ""
#: project/forms/reference_request.py:28 project/templates/_macros.html:1413
#: project/forms/reference_request.py:28 project/templates/_macros.html:1484
#: project/templates/event_suggestion/review_status.html:18
#: project/templates/reference_request/review_status.html:12
msgid "Review status"
@ -1264,34 +1264,34 @@ msgstr ""
msgid "Event"
msgstr ""
#: project/templates/_macros.html:393 project/templates/_macros.html:922
#: project/templates/_macros.html:393 project/templates/_macros.html:978
msgid "Date"
msgstr ""
#: project/templates/_macros.html:420 project/templates/_macros.html:579
#: project/templates/_macros.html:1482 project/templates/event/actions.html:51
#: project/templates/_macros.html:1553 project/templates/event/actions.html:51
msgid "Share"
msgstr ""
#: project/templates/_macros.html:424 project/templates/_macros.html:583
#: project/templates/_macros.html:1512
#: project/templates/_macros.html:1583
msgid "Add to calendar"
msgstr ""
#: project/templates/_macros.html:432 project/templates/_macros.html:594
#: project/templates/_macros.html:432 project/templates/_macros.html:597
#: project/templates/event/report.html:4
msgid "Report event"
msgstr ""
#: project/templates/_macros.html:459 project/templates/_macros.html:620
#: project/templates/_macros.html:459 project/templates/_macros.html:630
msgid "Show directions"
msgstr ""
#: project/templates/_macros.html:464 project/templates/_macros.html:625
#: project/templates/_macros.html:464 project/templates/_macros.html:622
msgid "The event takes place online."
msgstr ""
#: project/templates/_macros.html:466 project/templates/_macros.html:627
#: project/templates/_macros.html:466 project/templates/_macros.html:624
msgid "The event takes place both offline and online."
msgstr ""
@ -1300,27 +1300,64 @@ msgstr ""
msgid "Favorite events"
msgstr ""
#: project/templates/_macros.html:681 project/templates/event_date/list.html:5
#: project/templates/_macros.html:590 project/templates/_macros.html:633
#: project/templates/_macros.html:765
#: project/templates/admin/admin_units.html:34
#: project/templates/admin/users.html:34
#: project/templates/manage/events.html:100
#: project/templates/manage/members.html:35
#: project/templates/manage/organizers.html:23
#: project/templates/manage/places.html:27
#: project/templates/manage/references_incoming.html:20
#: project/templates/oauth2_client/list.html:34
#: project/templates/oauth2_client/read.html:17
msgid "Edit"
msgstr ""
#: project/templates/_macros.html:691
msgid "Referenced by"
msgstr ""
#: project/templates/_macros.html:703 project/templates/_macros.html:1296
#: project/templates/event/actions.html:38
#: project/templates/manage/events.html:107
#: project/templates/manage/references_incoming.html:10
msgid "Reference event"
msgstr ""
#: project/templates/_macros.html:712
#: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests"
msgstr ""
#: project/templates/_macros.html:723 project/templates/_macros.html:1293
#: project/templates/event/actions.html:32
#: project/templates/manage/events.html:105
msgid "Request reference"
msgstr ""
#: project/templates/_macros.html:731 project/templates/event_date/list.html:5
#: project/templates/event_date/list.html:299
#: project/templates/reference_request/review.html:32
msgid "Event Dates"
msgstr ""
#: project/templates/_macros.html:773
#: project/templates/_macros.html:829
msgid "Search location on Google"
msgstr ""
#: project/templates/_macros.html:839
#: project/templates/_macros.html:895
#, python-format
msgid "%(count)d event dates"
msgstr ""
#: project/templates/_macros.html:862 project/templates/_macros.html:864
#: project/templates/_macros.html:918 project/templates/_macros.html:920
#: project/templates/event_date/list.html:321
msgid "First"
msgstr ""
#: project/templates/_macros.html:867 project/templates/_macros.html:869
#: project/templates/_macros.html:923 project/templates/_macros.html:925
#: project/templates/event_date/list.html:322
#: project/templates/widget/event_suggestion/create.html:193
#: project/templates/widget/event_suggestion/create.html:218
@ -1331,12 +1368,12 @@ msgstr ""
msgid "Previous"
msgstr ""
#: project/templates/_macros.html:871
#: project/templates/_macros.html:927
#, python-format
msgid "Page %(page)d of %(pages)d (%(total)d total)"
msgstr ""
#: project/templates/_macros.html:873 project/templates/_macros.html:875
#: project/templates/_macros.html:929 project/templates/_macros.html:931
#: project/templates/event_date/list.html:324
#: project/templates/widget/event_suggestion/create.html:194
#: project/templates/widget/event_suggestion/create.html:219
@ -1346,88 +1383,97 @@ msgstr ""
msgid "Next"
msgstr ""
#: project/templates/_macros.html:878 project/templates/_macros.html:880
#: project/templates/_macros.html:934 project/templates/_macros.html:936
#: project/templates/event_date/list.html:325
msgid "Last"
msgstr ""
#: project/templates/_macros.html:945
#: project/templates/_macros.html:1001
msgid "Radius"
msgstr ""
#: project/templates/_macros.html:1159
#: project/templates/_macros.html:1215
msgid "Edit image"
msgstr ""
#: project/templates/_macros.html:1180
#: project/templates/_macros.html:1236
msgid "Close"
msgstr ""
#: project/templates/_macros.html:1181
#: project/templates/_macros.html:1237
msgid "Okay"
msgstr ""
#: project/templates/_macros.html:1193
#: project/templates/_macros.html:1249
msgid "Choose image file"
msgstr ""
#: project/templates/_macros.html:1229 project/templates/event/actions.html:65
#: project/templates/_macros.html:1285 project/templates/event/actions.html:65
#: project/templates/event/delete.html:12
msgid "Edit event"
msgstr ""
#: project/templates/_macros.html:1232 project/templates/manage/events.html:114
#: project/templates/_macros.html:1289 project/templates/event/actions.html:58
msgid "Duplicate event"
msgstr ""
#: project/templates/_macros.html:1300 project/templates/event/actions.html:44
#: project/templates/manage/events.html:111
msgid "Add to list"
msgstr ""
#: project/templates/_macros.html:1303 project/templates/manage/events.html:114
msgid "More"
msgstr ""
#: project/templates/_macros.html:1279
#: project/templates/_macros.html:1350
msgid "Please enter a valid time, between 00:00 and 23:59."
msgstr ""
#: project/templates/_macros.html:1307
#: project/templates/_macros.html:1378
#, python-format
msgid "Just use %(term)s"
msgstr ""
#: project/templates/_macros.html:1373
#: project/templates/_macros.html:1444
msgid "Event suggestion"
msgstr ""
#: project/templates/_macros.html:1491
#: project/templates/_macros.html:1562
msgid "Link copied"
msgstr ""
#: project/templates/_macros.html:1491
#: project/templates/_macros.html:1562
msgid "Copy link"
msgstr ""
#: project/templates/_macros.html:1521
#: project/templates/_macros.html:1592
msgid "Google calendar"
msgstr ""
#: project/templates/_macros.html:1523
#: project/templates/_macros.html:1594
msgid "Apple calendar"
msgstr ""
#: project/templates/_macros.html:1524
#: project/templates/_macros.html:1595
msgid "Yahoo calendar"
msgstr ""
#: project/templates/_macros.html:1525
#: project/templates/_macros.html:1596
msgid "Other calendar"
msgstr ""
#: project/templates/_macros.html:1720
#: project/templates/_macros.html:1791
msgid "Remove event date"
msgstr ""
#: project/templates/_macros.html:1749 project/templates/event/create.html:176
#: project/templates/_macros.html:1820 project/templates/event/create.html:176
#: project/templates/event/update.html:99
#: project/templates/widget/event_suggestion/create.html:129
msgid "Enter organizer"
msgstr ""
#: project/templates/_macros.html:1773
#: project/templates/_macros.html:1844
msgid "Enter list name"
msgstr ""
@ -1628,18 +1674,6 @@ msgstr ""
msgid "View"
msgstr ""
#: project/templates/admin/admin_units.html:34
#: project/templates/admin/users.html:34
#: project/templates/manage/events.html:100
#: project/templates/manage/members.html:35
#: project/templates/manage/organizers.html:23
#: project/templates/manage/places.html:27
#: project/templates/manage/references_incoming.html:20
#: project/templates/oauth2_client/list.html:34
#: project/templates/oauth2_client/read.html:17
msgid "Edit"
msgstr ""
#: project/templates/admin/admin_units.html:35
#: project/templates/admin/users.html:35
#: project/templates/manage/events.html:101
@ -1801,40 +1835,20 @@ msgstr ""
msgid "Actions for event"
msgstr ""
#: project/templates/event/actions.html:32
#: project/templates/manage/events.html:105
msgid "Request reference"
msgstr ""
#: project/templates/event/actions.html:33
#: project/templates/event/reference_request.html:10
msgid "Ask another organization to reference your event on their calendar."
msgstr ""
#: project/templates/event/actions.html:38
#: project/templates/manage/events.html:107
#: project/templates/manage/references_incoming.html:10
msgid "Reference event"
msgstr ""
#: project/templates/event/actions.html:39
#: project/templates/event/reference.html:9
msgid "Reference this event on your organization's calendar."
msgstr ""
#: project/templates/event/actions.html:44
#: project/templates/manage/events.html:111
msgid "Add to list"
msgstr ""
#: project/templates/event/actions.html:45
msgid "Add this event to a list of your organization."
msgstr ""
#: project/templates/event/actions.html:58
msgid "Duplicate event"
msgstr ""
#: project/templates/event/actions.html:61
#, python-format
msgid "Create another event for %(admin_unit_name)s"
@ -1845,7 +1859,8 @@ msgstr ""
msgid "List all events of %(admin_unit_name)s"
msgstr ""
#: project/templates/event/actions.html:74
#: project/templates/event/actions.html:74 project/templates/event/read.html:32
#: project/templates/event_date/read.html:34
#: project/templates/manage/events.html:131
msgid "Add event to list"
msgstr ""
@ -1987,11 +2002,6 @@ msgstr ""
msgid "Assistents"
msgstr ""
#: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests"
msgstr ""
#: project/templates/manage/reference_requests_incoming.html:19
msgid "Review request"
msgstr ""
@ -2242,11 +2252,11 @@ msgstr ""
msgid "Event successfully deleted"
msgstr ""
#: project/views/event.py:413
#: project/views/event.py:408
msgid "Referenced event changed"
msgstr ""
#: project/views/event.py:436
#: project/views/event.py:431
msgid "New event report"
msgstr ""

View File

@ -56,7 +56,7 @@ from project.views.utils import (
def event(event_id):
event = get_event_with_details_or_404(event_id)
can_read_event_or_401(event)
user_rights = get_menu_user_rights(event)
user_rights = get_user_rights(event)
dates = get_upcoming_event_dates(event.id)
url = url_for("event", event_id=event_id, _external=True)
share_links = get_share_links(url, event.name)
@ -384,15 +384,9 @@ def get_user_rights(event):
return {
"can_duplicate_event": has_access(event.admin_unit, "event:create"),
"can_verify_event": has_access(event.admin_unit, "event:verify"),
"can_update_event": has_access(event.admin_unit, "event:update"),
"can_reference_event": can_reference_event(event),
"can_create_reference_request": can_request_event_reference(event),
"can_create_event": has_access(event.admin_unit, "event:create"),
}
def get_menu_user_rights(event):
return {
"can_view_actions": current_user.is_authenticated,
"can_update_event": has_access(event.admin_unit, "event:update"),
}

View File

@ -15,7 +15,7 @@ from project.services.event import (
get_upcoming_event_dates,
)
from project.services.event_search import EventSearchParams
from project.views.event import get_event_category_choices, get_menu_user_rights
from project.views.event import get_event_category_choices, get_user_rights
from project.views.utils import (
flash_errors,
get_calendar_links_for_event_date,
@ -63,7 +63,7 @@ def event_date(id):
structured_data=structured_data,
meta=get_meta_data(event_date.event, event_date),
canonical_url=url_for("event_date", id=id, _external=True),
user_rights=get_menu_user_rights(event_date.event),
user_rights=get_user_rights(event_date.event),
dates=get_upcoming_event_dates(event_date.event_id),
share_links=share_links,
calendar_links=calendar_links,