divan/DiwanRazor/Areas/Admin/Pages/ReviewQuoteds.cshtml
Anas Rashid e8f2306422 Rename Ganjoor -> Diwan throughout the code
Projects (GanjooRazor -> DiwanRazor, GanjoorService.sln -> DiwanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/diwan) and DB tables (Diwan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

147 lines
6.8 KiB
Plaintext

@page
@using DNTPersianUtils.Core
@model DiwanRazor.Areas.Admin.Pages.ReviewQuotedsModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = "_AdminLayout";
ViewData["Title"] = "بازبینی مشق‌شعرهای پیشنهادی";
}
<div class="up-page-header">
<h1>@ViewData["Title"]</h1>
</div>
@if (!string.IsNullOrEmpty(Model.FatalError))
{
<div class="up-alert up-alert--danger">@Model.FatalError</div>
}
else if (Model.DiwanQuotedPoem == null)
{
<partial name="_EmptyState" model="@("پیشنهادی وجود ندارد.")" />
}
else
{
<div class="up-card">
<p class="up-hint">تعداد کل: @Model.TotalCount</p>
<div class="up-field">
<label>پیشنهاد دهنده</label>
<div class="up-field-static"><a href="/user/edits/?allusers=1&userid=@Model.DiwanQuotedPoem.SuggestedById" target="_blank">@Model.SuggestedBy.NickName</a></div>
</div>
<form method="post" class="up-form">
@Html.AntiForgeryToken()
<input type="hidden" asp-for="ModerationModel.Id" />
<div class="up-field">
<label asp-for="ModerationModel.Approved">تأیید می‌شود؟</label>
<input asp-for="ModerationModel.Approved" />
</div>
<div class="up-field">
<label asp-for="ModerationModel.ReviewNote">یادداشت بررسی</label>
<textarea asp-for="ModerationModel.ReviewNote" rows="4"></textarea>
</div>
<div class="up-form-actions">
<button type="submit" class="up-btn up-btn--success">بررسی</button>
<a href="/Admin/ReviewQuoteds?skip=@(Model.Skip + 1)" role="button" class="up-btn up-btn--ghost">بعدی</a>
</div>
</form>
</div>
<div class="up-card">
<h2 class="up-card__title">بیت مرجع از <a href="/?p=@Model.DiwanQuotedPoem.PoemId">شعر</a></h2>
@if (Model.DiwanQuotedPoem.CoupletIndex != null && Model.DiwanQuotedPoem.CoupletIndex != -1)
{
<p>@($"{(Model.Couplets[(int)Model.DiwanQuotedPoem.CoupletIndex].Item1 + 1).ToPersianNumbers()} - {Model.Couplets[(int)Model.DiwanQuotedPoem.CoupletIndex].Item2}")</p>
}
<div class="up-field">
<label>مصرع اول مهم است</label>
<input type="checkbox" disabled @(Model.DiwanQuotedPoem.CoupletVerse1ShouldBeEmphasized ? "checked=\"checked\"" : "") />
</div>
<div class="up-field">
<label>مصرع دوم مهم است</label>
<input type="checkbox" disabled @(Model.DiwanQuotedPoem.CoupletVerse2ShouldBeEmphasized ? "checked=\"checked\"" : "") />
</div>
<div class="up-field">
<label>شاعر مرجع</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.PoetId</div>
</div>
@if (Model.DiwanQuotedPoem.RelatedPoemId != null)
{
<p><a href="/?p=@Model.DiwanQuotedPoem.RelatedPoemId" class="up-btn up-btn--ghost up-btn--sm">مشاهدهٔ شعر مرتبط</a></p>
}
<div class="up-field">
<label>بیت مرتبط</label>
@if (Model.DiwanQuotedPoem.RelatedCoupletIndex != null && Model.DiwanQuotedPoem.RelatedCoupletIndex != -1)
{
if (Model.DiwanQuotedPoem.RelatedCoupletIndex < Model.RelatedCouplets.Length)
{
<p>@($"{(Model.RelatedCouplets[(int)Model.DiwanQuotedPoem.RelatedCoupletIndex].Item1 + 1).ToPersianNumbers()} - {Model.RelatedCouplets[(int)Model.DiwanQuotedPoem.RelatedCoupletIndex].Item2}")</p>
}
else
{
<p class="red-color">خطا</p>
}
}
</div>
<div class="up-field">
<label>مصرع اول مرتبط (خارج از دیوان)</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.RelatedCoupletVerse1</div>
</div>
<div class="up-field">
<label>مصرع اول مهم است</label>
<input type="checkbox" disabled @(Model.DiwanQuotedPoem.RelatedCoupletVerse1ShouldBeEmphasized ? "checked=\"checked\"" : "") />
</div>
<div class="up-field">
<label>مصرع دوم مرتبط (خارج از دیوان)</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.RelatedCoupletVerse2</div>
</div>
<div class="up-field">
<label>مصرع دوم مهم است</label>
<input type="checkbox" disabled @(Model.DiwanQuotedPoem.RelatedCoupletVerse2ShouldBeEmphasized ? "checked=\"checked\"" : "") />
</div>
<div class="up-field">
<label>ترتیب</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.SortOrder</div>
</div>
<div class="up-field">
<label>این شعر قدیمی‌تر از شعر مرتبط است</label>
<input type="checkbox" disabled @(Model.DiwanQuotedPoem.IsPriorToRelated ? "checked=\"checked\"" : "") />
</div>
<div class="up-field">
<label>منتسب به هر دو شاعر</label>
<input type="checkbox" disabled @(Model.DiwanQuotedPoem.ClaimedByBothPoets ? "checked=\"checked\"" : "") />
</div>
<div class="up-field">
<label>شاعر</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.RelatedPoetId - @Model.DiwanQuotedPoem.CachedRelatedPoemPoetName</div>
</div>
<div class="up-field">
<label>سالمرگ شاعر</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.CachedRelatedPoemPoetDeathYearInLHijri</div>
</div>
<div class="up-field up-field--ltr">
<label>نشانی صفحهٔ شاعر</label>
<div class="up-field-static"><a href="@Model.DiwanQuotedPoem.CachedRelatedPoemPoetUrl">@Model.DiwanQuotedPoem.CachedRelatedPoemPoetUrl</a></div>
</div>
<div class="up-field">
<label>تصویر شاعر</label>
<img src="@($"{DiwanRazor.APIRoot.InternetUrl}{Model.DiwanQuotedPoem.CachedRelatedPoemPoetImage}")" style="max-width:200px;" />
</div>
<div class="up-field">
<label>عنوان شعر</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.CachedRelatedPoemFullTitle</div>
</div>
<div class="up-field up-field--ltr">
<label>نشانی شعر</label>
<div class="up-field-static"><a href="@Model.DiwanQuotedPoem.CachedRelatedPoemFullUrl">@Model.DiwanQuotedPoem.CachedRelatedPoemFullUrl</a></div>
</div>
<div class="up-field">
<label>یادداشت</label>
<div class="up-field-static">@Model.DiwanQuotedPoem.Note</div>
</div>
</div>
}