Storyline: per-chapter DM notes
Each chapter page gets a collapsible "Chapter notes" card at the top — a free-text log the DM fills during play (the story the party tells after the Crooked Goose, names given to NPCs, threads for next time). Saved per chapter slug with a "saved <timestamp>" marker, same shape as the Enemy/NPC game-notes field. New: ChapterNote entity (slug-keyed, unique) + repository findOrCreate(), ChapterNoteType form, chapter_note table migration (ENGINE = InnoDB pinned). The storyline chapter route now also accepts POST to save. Chapters stay hand-written Twig; only the mutable notes live in the DB. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,24 @@
|
||||
</nav>
|
||||
|
||||
<div class="col-lg-9 order-lg-1">
|
||||
<details class="card shadow-sm mb-4 storyline-notes" open>
|
||||
<summary class="card-header d-flex justify-content-between align-items-center">
|
||||
<span>📝 Chapter notes</span>
|
||||
{% if note.updatedAt %}
|
||||
<span class="text-body-secondary small fw-normal">saved {{ note.updatedAt|date('Y-m-d H:i') }}</span>
|
||||
{% endif %}
|
||||
</summary>
|
||||
<div class="card-body">
|
||||
<p class="text-body-secondary small mb-2">
|
||||
Your running log for this chapter — what actually happened at the table.
|
||||
</p>
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.notes) }}
|
||||
<button class="btn btn-primary mt-2">Save notes</button>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<article class="storyline-doc">
|
||||
<header class="storyline-doc-head">
|
||||
<div class="storyline-eyebrow">Storyline · {{ chapter.eyebrow }}</div>
|
||||
|
||||
Reference in New Issue
Block a user