22 lines
4.0 KiB
Plaintext
22 lines
4.0 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>
|
||
<h2 id="character-operation-title">@(Model.Action=="archive"?"Remove relationship":Model.Action=="event-remove"?"Remove one relationship event":Model.Action=="definition"?"Edit relationship definition":"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"?"The pair, type, direction, book and narrative start/end remain unchanged. Use the full Relationships Editor for structural changes.":"This changes one recorded development at its original scene, not the definition or other events.")</p>
|
||
@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>
|