When the user duplicates an event, the `menu_id` is copied. This causes
two issues. First, it links the event to the wrong menu. Then, the
controller `event` uses this `menu_id` to compute the target URL. It
will therefore redirect the user to the wrong event page.
opw-670353
On the event page and on the event list page on a website, add a
label "participating" for the logged users that are participating
to the event to avoid mistakenly double-subscribing. But we don't
hard-prevent it, because it should still be possible to subscribe someone else.
Small improvement: The portal group in general settings was hidden. We set it
visible because it contains some useful options like 'Allow external users to
sign up'
Basically, this apply what was done in 87090c1b8b
everywhere where the events begin & end dates are displayed,
so all the events dates displayed in the front-end are the same,
so they are all within the event own timezone instead of the
user browser time zone.
opw-667065
The controller /event/<event_id>/page/<page> raise exception if page is not existing.
Allow to pass the template reference when user are creating a new page.
Without it, it is impossible for the end user to create a website_event page without
change manually the xml id because the xml id is based on the module from the template.
This fix is retro compatible, because from_template will be ignored until next update
of website. And during update from website, website_event will be updated because it's a
dependance and so the default_page template created.
t-field expects a UTC datetime which it then localizes to the current
viewer's timezone (using context tz from the browser), but goal here was
to display the event's own local time, so t-field was provided an
already localized datetime and would parse it as UTC then re-offset it
based on the user's timezone, resulting in a completely nonsensical
displayed datetime.
Just display the localized datetime without reprocessing it (save to
slice off the seconds count)