Projects (GanjooRazor -> DivanRazor, GanjoorService.sln -> DivanService.sln), files, folders, classes, namespaces, settings, API routes (/api/divan) and DB tables (Divan*). 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>
119 lines
5.2 KiB
Plaintext
119 lines
5.2 KiB
Plaintext
@page
|
|
@model DivanRazor.Areas.User.Pages.CatEditorModel
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@{
|
|
Layout = "_UserPanelLayout";
|
|
ViewData["Title"] = "ویرایشگر متن بخش";
|
|
await DivanRazor.Utils.DivanSessionChecker.ApplyPermissionsToViewData(Request, Response, ViewData);
|
|
}
|
|
<div class="up-page-header">
|
|
<h1>@ViewData["Title"]</h1>
|
|
</div>
|
|
|
|
<div class="up-alert up-alert--warning">
|
|
<p>لطفاً از گنجاندن ادعاهای قومیتی، جغرافیایی یا مذهبی یا هر گونه ادعایی که روی آنها اجماع وجود ندارد یا موجب بحث و اعتراض میشود در زندگینامههای شاعران خودداری کنید.</p>
|
|
<p>در گنجاندن پیوند به منابع حتیالامکان از ویکیپدیا یا وبگاههای مشهور با عمر بالا بدون وجود تبلیغات در آنها استفاده کنید. ارجاع به وبگاههای دیگر به دلیل آن که ممکن است تبلیغاتی فرض شود و همینطور احتمال آن وجود دارد که در طولانیمدت با از دسترس خارج شدن وبگاه تبدیل به پیوند مرده شود مورد قبول قرار نمیگیرد.</p>
|
|
<p class="up-mt-0">از آنجا که متن پس از حذف پیوندها به صورت صرفاً متنی در نرمافزارهای جانبی مورد استفاده قرار میگیرد متن پیوندهای احتمالی را به صورتی تنظیم کنید که با حذف پیوند ناقص نشود.</p>
|
|
</div>
|
|
|
|
@if (Model.MyLastEdit != null)
|
|
{
|
|
<script>
|
|
async function deleteCatCorrection(id) {
|
|
var ok = await upConfirm('آیا از حذف تغییرات پیشنهادی اطمینان دارید؟');
|
|
if (!ok) return;
|
|
|
|
$('#deletecorrections').hide();
|
|
$('#saving').text('در حال ذخیره ...');
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '?handler=DeleteCatCorrection',
|
|
data: { catid: id },
|
|
error: function (e) {
|
|
upToast(e.responseText || 'خطا رخ داد.', 'error');
|
|
},
|
|
success: function () {
|
|
location.reload(true);
|
|
},
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<div class="up-card">
|
|
<h2 class="up-card__title">ویرایشهای بررسینشدهٔ من</h2>
|
|
<table>
|
|
<tr>
|
|
<td>متن اولیه</td>
|
|
<td>تغییرات من</td>
|
|
</tr>
|
|
|
|
@if (Model.MyLastEdit.Description != null)
|
|
{
|
|
<tr>
|
|
<td colspan="2">
|
|
تغییرات متن
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p class="red-color" id="title-lastedit-original">@Model.MyLastEdit.OriginalDescription</p>
|
|
</td>
|
|
<td>
|
|
<p class="green-color" id="title-lastedit-edited">@Model.MyLastEdit.Description</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<p id="title-lastedit-compare">@Model.MyLastEdit.OriginalDescription</p>
|
|
<script>
|
|
$(document).ready(function () {
|
|
compareCorrectionBlocks('title-lastedit-original', 'title-lastedit-edited', 'title-lastedit-compare');
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
}
|
|
@if (!string.IsNullOrEmpty(Model.MyLastEdit.Note))
|
|
{
|
|
<tr>
|
|
<td>یادداشت:</td>
|
|
<td>
|
|
@Model.MyLastEdit.Note
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
<p id="saving" class="up-hint"></p>
|
|
<div class="up-form-actions">
|
|
<a role="button" id="deletecorrections" class="up-btn up-btn--danger" onclick="deleteCatCorrection(@Model.PageInformation.PoetOrCat.Cat.Id)">انصراف و حذف این ویرایش</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="up-card">
|
|
<form method="post" class="up-form">
|
|
@Html.AntiForgeryToken()
|
|
@if (Model.PageInformation != null)
|
|
{
|
|
<p><a role="button" target="_blank" href="@Model.PageInformation.FullUrl" class="up-btn up-btn--ghost">@Model.PageInformation.FullTitle</a></p>
|
|
}
|
|
|
|
<input asp-for="Correction.CatId" type="hidden" />
|
|
|
|
<div class="up-field">
|
|
<label asp-for="Correction.DescriptionHtml">متن</label>
|
|
<textarea asp-for="Correction.DescriptionHtml" class="inputTextarea editor" rows="20"></textarea>
|
|
</div>
|
|
|
|
<div class="up-field">
|
|
<label asp-for="Correction.Note">توضیح این ویرایش</label>
|
|
<input asp-for="Correction.Note" />
|
|
</div>
|
|
|
|
<div class="up-form-actions">
|
|
<button type="submit" name="approve" id="approve" class="up-btn up-btn--success">ذخیره</button>
|
|
</div>
|
|
</form>
|
|
</div>
|