- Npc gains self-referencing father/mother (nullable, ON DELETE SET NULL); editable as dropdowns on the per-NPC form - app:npc:link-parents parses "son/daughter/child of X [and Y]" from the Relationships / Notes column, resolves the names within the same family, and works out which parent is father vs mother from husband/wife/widow(er) and son/daughter/sister/brother cues (plus a small name-gender table for the few the text can't disambiguate). --dry-run / --force. 92/180 linked, none ambiguous. - migrations now pin ENGINE=InnoDB - the local WAMP MariaDB defaults to MyISAM, which silently drops foreign keys Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
56 lines
2.1 KiB
Twig
56 lines
2.1 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}{{ npc.name }} · NPC's · dmtools{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<div>
|
|
<a href="{{ path('app_npcs') }}" class="text-decoration-none small">← All NPC's</a>
|
|
<h1 class="h3 mb-0">{{ npc.name }}</h1>
|
|
</div>
|
|
{% if npc.updatedAt %}
|
|
<span class="text-body-secondary small">Updated {{ npc.updatedAt|date('Y-m-d H:i') }}</span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{{ form_start(form) }}
|
|
<div class="row g-4">
|
|
<div class="col-lg-5">
|
|
<div class="card shadow-sm">
|
|
<div class="card-header">Details</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-8">{{ form_row(form.name) }}</div>
|
|
<div class="col-4">{{ form_row(form.age) }}</div>
|
|
</div>
|
|
{{ form_row(form.family) }}
|
|
{{ form_row(form.race) }}
|
|
{{ form_row(form.occupation) }}
|
|
{{ form_row(form.villageStatus) }}
|
|
{{ form_row(form.bloodCartInvolvement) }}
|
|
{{ form_row(form.mysteryImportance) }}
|
|
<div class="row">
|
|
<div class="col-6">{{ form_row(form.father) }}</div>
|
|
<div class="col-6">{{ form_row(form.mother) }}</div>
|
|
</div>
|
|
{{ form_row(form.relationships) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-7">
|
|
<div class="card shadow-sm">
|
|
<div class="card-header">Game notes</div>
|
|
<div class="card-body">
|
|
{{ form_row(form.gameNotes, {label: false}) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 d-flex gap-2">
|
|
<button class="btn btn-primary">Save</button>
|
|
<a href="{{ path('app_npcs') }}" class="btn btn-outline-secondary">Cancel</a>
|
|
</div>
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|