divan/GanjooRazor/Areas/User/Pages/SuggestPersonEdit.cshtml
Hamid Reza Mohammadi eb88056d0b people tags #387
2026-09-30 18:31:59 +03:30

110 lines
5.1 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" />
<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>زاده:</td>
<td><input asp-for="Suggestion.SuggestedBirthYearInLHijri" /> (قمری)</td>
</tr>
<tr>
<td>تاریخ تولد مستند است:</td>
<td><input asp-for="Suggestion.SuggestedValidBirthDate" /></td>
</tr>
<tr>
<td>زادگاه:</td>
<td>
<select asp-for="Suggestion.SuggestedBirthLocationId">
@foreach (var location in Model.Locations)
{
<option value="@(location.Id == 0 ? "" : location.Id.ToString())">@location.Name</option>
}
</select>
</td>
</tr>
<tr>
<td>درگذشته:</td>
<td><input asp-for="Suggestion.SuggestedDeathYearInLHijri" /> (قمری)</td>
</tr>
<tr>
<td>تاریخ وفات مستند است:</td>
<td><input asp-for="Suggestion.SuggestedValidDeathDate" /></td>
</tr>
<tr>
<td>آرامگاه:</td>
<td>
<select asp-for="Suggestion.SuggestedDeathLocationId">
@foreach (var location in Model.Locations)
{
<option value="@(location.Id == 0 ? "" : location.Id.ToString())">@location.Name</option>
}
</select>
</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>
}