31 lines
5.7 KiB
Plaintext
31 lines
5.7 KiB
Plaintext
@model CharacterWorkspaceOperation
|
||
@{var r=Model.Record.Relationship;var destructive=Model.Action is "archive" or "event-remove";var linked=Model.Action.StartsWith("event-")&&Model.Event?.ProtectedSource==true;}
|
||
<form method="post" asp-controller="CharacterWorkspace" asp-action="Operation" asp-route-id="@Model.CharacterID" data-workspace-operation-form data-confirm-skip="true">
|
||
<h2 id="character-operation-title">@(Model.Action=="archive"?"Remove relationship":Model.Action=="event-remove"?"Remove one relationship event":Model.Action=="definition"?"Edit relationship":"Edit one relationship event")</h2>
|
||
<div asp-validation-summary="All" class="text-danger" role="alert"></div>
|
||
<input asp-for="CharacterID" type="hidden"/><input asp-for="RelationshipID" type="hidden"/><input asp-for="EventID" type="hidden"/><input asp-for="Action" type="hidden"/><input asp-for="Version" type="hidden"/>
|
||
<p><strong>@r.CharacterAName @(r.IsReciprocal?"↔":"→") @r.CharacterBName</strong> · @r.RelationshipTypeName · @r.RelationshipCategoryName</p>
|
||
@if(Model.Action=="archive"){
|
||
<p>This removes the <strong>underlying relationship definition</strong> from active Family, Story and Timeline views. It archives one canonical record; it does not permanently delete it.</p><p><strong>@Model.Record.EventCount dependent scene events will be retained</strong>, including their source/history. Restore the definition through Archived Items to make them active again.</p><p>@(r.IsReciprocal?"Both directions of this reciprocal flag belong to this one record and will be removed together.":"This is a directional record.")</p>@if(Model.Record.OtherPairRecords>0){<p class="alert alert-warning">@Model.Record.OtherPairRecords separately recorded relationship(s) between these characters will remain. They are independent authored records; review them separately.</p>}
|
||
}else if(Model.Action=="event-remove"){
|
||
<p>This permanently removes <strong>only event #@Model.EventID</strong> at scene #@Model.Event?.Record.SceneID. The relationship definition and other events remain. Its derived state will be recalculated from the remaining records.</p>
|
||
}
|
||
@if(linked){<p class="alert alert-warning">This event has manuscript evidence, review provenance or source dependencies. Direct modification/removal is blocked so that evidence is not orphaned. Use its source/review workflow.</p><a asp-controller="Scenes" asp-action="Edit" asp-route-id="@Model.Event?.Record.SceneID">Open source scene</a>}
|
||
else if(!destructive){
|
||
<p class="small">@(Model.Action=="definition"?"Category is derived from the selected canonical type. Book, narrative start/end and initial/scene-established status remain unchanged. Structural changes with recorded history or across categories require the full Relationships Editor.":"This changes one recorded development at its original scene, not the definition or other events.")</p>
|
||
@if(Model.Action=="definition"){
|
||
<label asp-for="TypeID">Relationship type (category · type)</label><select asp-for="TypeID" asp-items="Model.Types" class="form-select" disabled="@(Model.Record.EventCount>0)"></select>
|
||
<p class="small">@Model.Record.EventCount recorded event(s) will be retained. Type/direction changes are available here only without events and within the existing category. Independent definitions are unchanged.</p>
|
||
<label class="character-checkbox"><input asp-for="ReverseDirection" disabled="@(Model.Record.EventCount>0)"/> Reverse the displayed direction: @r.CharacterBName → @r.CharacterAName</label>
|
||
<label>Representation<select asp-for="Reciprocal" class="form-select" disabled="@(Model.Record.EventCount>0||r.RelationshipCategoryName=="Family")"><option value="false">Directional: A → B</option><option value="true">Reciprocal: one A ↔ B record</option></select></label><p class="small">Family-category reciprocity changes require the full editor to review family semantics.</p>
|
||
<label>Persistence<select asp-for="Permanent" class="form-select"><option value="true">Permanent relationship</option><option value="false">Not permanent</option></select></label>
|
||
<label>Reader awareness<select asp-for="ReaderKnows" class="form-select"><option value="true">Known to reader</option><option value="false">Not recorded as known</option></select></label>
|
||
<a asp-controller="RelationshipMap" asp-action="Index" asp-route-projectId="@r.ProjectID" asp-route-focusCharacterId="@Model.CharacterID" asp-route-relationshipId="@r.CharacterRelationshipID">Full Relationships Editor for this pair</a>
|
||
}
|
||
@if(Model.Action!="definition"||r.IsInitialRelationship){<label asp-for="StateID">@(Model.Action=="definition"?"Initial state":"Recorded event state")</label><select asp-for="StateID" asp-items="Model.States" class="form-select"><option value="">Not recorded</option></select><label asp-for="Intensity">Intensity (1–10)</label><input asp-for="Intensity" type="number" min="1" max="10" class="form-control"/><label class="character-checkbox"><input asp-for="Awareness"/> @(Model.Action=="definition"?"Reader initially knows":"Known to the other character at this event")</label>}
|
||
<label asp-for="Notes">@(Model.Action=="definition"?"Definition notes":"Event description")</label><textarea asp-for="Notes" rows="7" maxlength="4000" class="form-control"></textarea>
|
||
}
|
||
@if(destructive&&!linked){<label class="character-checkbox"><input asp-for="Confirmed" required/> I confirm the scope and consequences above.</label>}
|
||
<div class="button-row">@if(!linked){<button type="submit" class="btn @(destructive?"btn-danger":"btn-primary")">@(destructive?"Confirm removal":"Save")</button>}<button type="button" class="btn btn-outline-secondary" data-workspace-cancel>Cancel</button><a asp-controller="RelationshipMap" asp-action="Index" asp-route-projectId="@r.ProjectID" asp-route-focusCharacterId="@Model.CharacterID">Full Relationships Editor</a></div>
|
||
</form>
|