divan/DiwanRazor/Areas/User/Pages/CatEdits.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

107 lines
3.4 KiB
Plaintext

@page
@model DiwanRazor.Areas.User.Pages.CatEditsModel
@using RMuseum.Models.Diwan
@using RMuseum.Services.Implementation
@{
Layout = "_UserPanelLayout";
ViewData["Title"] = "ویرایش‌های بخشهای من";
await DiwanRazor.Utils.DiwanSessionChecker.ApplyPermissionsToViewData(Request, Response, ViewData);
}
<div class="up-page-header">
<h1>@ViewData["Title"]</h1>
</div>
@if (Model.LastError != "")
{
<div class="up-alert up-alert--danger">@Model.LastError</div>
}
else
{
if (@Model.CanEdit)
{
<div class="up-form-actions">
<a role="button" href="/User/CatEdits?AllUsers=1" class="up-btn up-btn--ghost">ویرایش‌های بخش‌های همه</a>
</div>
}
<partial name="_Pagination" model="Model.PaginationLinks" />
@if (Model.Corrections.Count == 0)
{
<partial name="_EmptyState" model="@("شما هنوز هیچ ویرایشی در بخش‌های انجام نداده‌اید.")" />
}
@foreach (var correction in Model.Corrections)
{
<div class="up-list-item" id="correction-@correction.Id">
<table>
@if (Model.AllUsersEdits)
{
<tr>
<td colspan="3"><a href="/hashieha/?userid=@correction.UserId" target="_blank">@correction.UserNickname</a></td>
</tr>
}
<tr>
<td colspan="3">
<a href="/?p=@correction.PageId">مشاهدهٔ بخش</a>
</td>
</tr>
<tr>
<td>متن اولیه</td>
<td>تغییرات من</td>
<td>نتیجهٔ بررسی</td>
</tr>
@if (correction.Description != null)
{
<tr>
<td>
<p style="color:red">متن اولیه: @correction.Description</p>
</td>
<td>
<p style="color:green">@correction.Description</p>
</td>
<td>
<partial name="_ReviewResultBadge" model="correction.Result" />
</td>
</tr>
@if (!string.IsNullOrEmpty(correction.ReviewNote))
{
<tr>
<td colspan="3">
<p>@correction.ReviewNote</p>
</td>
</tr>
}
}
@if (!string.IsNullOrEmpty(correction.Note))
{
<tr>
<td>یادداشت:</td>
<td colspan="2">
@correction.Note
</td>
</tr>
}
@if (!string.IsNullOrEmpty(correction.ReviewNote))
{
<tr>
<td>یادداشت بررسی:</td>
<td colspan="2">
@correction.ReviewNote
</td>
</tr>
}
</table>
</div>
}
<partial name="_Pagination" model="Model.PaginationLinks" />
}