divan/GanjooRazor/Areas/User/Pages/SuggestPersonEdit.cshtml
Hamid Reza Mohammadi 4f1f155266 people tags #387
2026-10-01 08:07:46 +03:30

83 lines
4.3 KiB
Plaintext

@page
@model GanjooRazor.Areas.User.Pages.SuggestPersonEditModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = "_UserPanelLayout";
ViewData["Title"] = "پیشنهاد ویرایش شخصیت";
await GanjooRazor.Utils.GanjoorSessionChecker.ApplyPermissionsToViewData(Request, Response, ViewData);
}
@if (!string.IsNullOrEmpty(Model.LastError))
{
<div class="up-alert up-alert--danger">@Model.LastError</div>
}
else
{
<div class="up-page-header">
<h1>پیشنهاد ویرایش: @Model.Person.Name</h1>
</div>
<p class="up-hint">
این پیشنهاد مستقیماً اعمال نمی‌شود؛ پس از بررسی و تأیید توسط مدیران، در مشخصات
<a href="javascript:void(0)" onclick="PersonWindow.open(@Model.Person.Id)">@Model.Person.Name</a> اعمال خواهد شد.
</p>
@if (!string.IsNullOrEmpty(Model.LastResult))
{
<p>@Html.Raw(Model.LastResult)</p>
}
<div class="up-card">
<form method="post" action="/User/SuggestPersonEdit?id=@Model.Person.Id&amp;Handler=SuggestEdit">
@Html.AntiForgeryToken()
<input type="hidden" asp-for="Suggestion.PersonId" />
@* birth/death year, "date is documented" and birth/death location have no UI here for now
(no real usage of them elsewhere yet) - carried through as hidden fields instead of
dropped outright, so submitting this form never blanks out whatever the person record
already has for these on approval (GanjoorRelatedPersonService applies every Suggested*
field unconditionally, with no "did they actually change this" check). *@
<input type="hidden" asp-for="Suggestion.SuggestedBirthYearInLHijri" />
<input type="hidden" asp-for="Suggestion.SuggestedValidBirthDate" />
<input type="hidden" asp-for="Suggestion.SuggestedBirthLocationId" />
<input type="hidden" asp-for="Suggestion.SuggestedDeathYearInLHijri" />
<input type="hidden" asp-for="Suggestion.SuggestedValidDeathDate" />
<input type="hidden" asp-for="Suggestion.SuggestedDeathLocationId" />
<table>
<tr>
<td>پیشنهاد حذف این شخصیت:</td>
<td>
<input asp-for="Suggestion.SuggestedForDeletion" id="suggestedForDeletion" />
<p class="up-hint"><small>در صورت انتخاب این گزینه سایر فیلدها نادیده گرفته خواهد شد و در صورت تأیید مدیران، این شخصیت و همهٔ نسبت‌ها/وابستگی‌های آن حذف می‌شود.</small></p>
</td>
</tr>
<tr>
<td>نام:</td>
<td><input asp-for="Suggestion.SuggestedName" size="40" /></td>
</tr>
<tr>
<td>نشانی ویکی‌پدیا:</td>
<td><input style="text-align:left;direction:ltr;" asp-for="Suggestion.SuggestedWikiUrl" size="60" /></td>
</tr>
<tr>
<td>
عنوان تبارنامه:
<p class="up-hint"><small>پُر کنید تا این شخصیت در <a href="javascript:void(0)" onclick="PeopleExplorer.open()">فهرست تبارنامه‌ها</a> با این عنوان دیده شود.</small></p>
</td>
<td><input asp-for="Suggestion.SuggestedFamilyTreeCaption" size="40" /></td>
</tr>
<tr>
<td>توضیحات:</td>
<td><textarea asp-for="Suggestion.SuggestedDescription" rows="10" cols="60"></textarea></td>
</tr>
<tr>
<td>یادداشت برای مدیر بررسی‌کننده:</td>
<td><textarea asp-for="Suggestion.SuggestionNote" rows="3" cols="60"></textarea></td>
</tr>
</table>
<input type="submit" value="ثبت پیشنهاد" class="up-btn up-btn--success" />
<a role="button" href="javascript:void(0)" onclick="history.back()" class="up-btn up-btn--ghost">انصراف</a>
</form>
</div>
}