feat(post-form): U4 — Draft badge + owner Edit/Delete controls on cards

Render on each journal card, gated by owner_can_edit (R1/R3/R5/R6, KTD8):
- Draft badge (amber) when the entry is unpublished.
- Edit link -> /post?edit=<route>&return=<feed-url> (D5: a save from the home
  feed returns to home, not always the trip page); feed_return_url threaded from
  trip.html.twig/home.html.twig (page.url).
- Delete control with inline Cancel/Confirm button-swap (no browser dialog),
  data-entry-route carried for U6's delete JS, plus an aria-live status slot.
- 44x44px min tap targets (D8); titlerow wraps on narrow phones.

Verified on the container: anon sees no controls/badge; owner sees Edit+Delete on
all 13 cards with a Draft badge on the unpublished one; a non-owner authenticated
session (testrunner vs owner mischa) sees none and no drafts (V5). Browser
screenshot verification unavailable (no local Playwright); did a code-level
layout review instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H1FrCYNq6RXdGYbn5PFrhM
This commit is contained in:
2026-07-04 23:48:57 +02:00
co-authored by Claude Opus 4.8
parent a2d4f81bfe
commit c4228e9027
4 changed files with 102 additions and 4 deletions
+2 -1
View File
@@ -93,7 +93,8 @@
gpx_urls: gpx_urls,
gps_points: gps_points,
show_sort: true,
owner_can_edit: owner_can_edit
owner_can_edit: owner_can_edit,
feed_return_url: page.url
} only %}
</div>