diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-04 01:24:55 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-04 01:24:55 +0200 |
| commit | 206dc5c50a73c5402b90d7fdc8945d3ba9356758 (patch) | |
| tree | b2c98c48248c878da4344e61734bfa89130f18d1 /app/controllers/application_controller.rb | |
| parent | d9461bae0b6232d618dde118360b44bb80f962b8 (diff) | |
Add self-service event creation from nodes#show
nodes#show's events table now renders unconditionally (previously
hidden entirely for a zero-event node) and gains an "add event" link.
The suggested tag_list is derived from the page's own category tags
via NodesHelper::DEFAULT_EVENT_TAG_BY_PAGE_TAG (erfa-detail/
chaostreff-detail -> open-day) rather than hardcoded, and degrades to
a blank field for any node whose tags don't match - deliberately
universal, not chapter-specific, since Updates have historically
carried event dates the same way.
events#new surfaces *why* the tag was pre-filled via flash.now (not
flash - this is a same-request render, not a redirect), using an
explicit auto_tag_source param passed alongside tag_list rather than
having the controller re-derive the reason from node_id.
No destroy link added to nodes#show's events list - deliberate, per
existing subnav-semantics convention (destructive actions live on the
resource's own views). Covered directly by test.
Adds real coverage for EventsController, previously 100% commented-out
scaffold, plus unit tests for the new tag-mapping helper and the
weekday-abbreviation helpers from the prior commit.
Diffstat (limited to 'app/controllers/application_controller.rb')
0 files changed, 0 insertions, 0 deletions
