132 lines
4.9 KiB
Plaintext
132 lines
4.9 KiB
Plaintext
@page
|
|
@model GanjooRazor.Areas.User.Pages.CatEditorModel
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@{
|
|
Layout = "_UserPanelLayout";
|
|
ViewData["Title"] = "ویرایشگر متن بخش";
|
|
await GanjooRazor.Utils.GanjoorSessionChecker.ApplyPermissionsToViewData(Request, Response, ViewData);
|
|
}
|
|
<h1>@ViewData["Title"]</h1>
|
|
|
|
<p>لطفاً از گنجاندن ادعاهای قومیتی، جغرافیایی یا مذهبی یا هر گونه ادعایی که روی آنها اجماع وجود ندارد یا موجب بحث و اعتراض میشود در زندگینامههای شاعران خودداری کنید.</p>
|
|
<p>در گنجاندن پیوند به منابع حتیالامکان از ویکیپدیا یا وبگاههای مشهور با عمر بالا بدون وجود تبلیغات در آنها استفاده کنید. ارجاع به وبگاههای دیگر غیر از آن که ممکن است به دلیل آن که تبلیغاتی فرض شود مورد قبول قرار نمیگیرد در طولانی مدت ممکن است مبدل به پیوند مرده شود.</p>
|
|
<p>در مورد رسمالخط پیشنهادی گنجور <a href="https://blog.ganjoor.net/1402/12/11/dastoor-e-khat/" target="_blank">اینجا</a> را ببینید.</p>
|
|
@if (Model.PageInformation != null)
|
|
{
|
|
<p><a role="button" target="_blank" href="@Model.PageInformation.FullUrl" class="actionlink">@Model.PageInformation.FullTitle</a></p>
|
|
}
|
|
|
|
|
|
|
|
@if (Model.MyLastEdit != null)
|
|
{
|
|
<script>
|
|
function deleteCatCorrection(id) {
|
|
if (!confirm('آیا از حذف تغییرات پیشنهادی اطمینان دارید؟'))
|
|
return;
|
|
|
|
$('#deletecorrections').hide();
|
|
$('#saving').text('در حال ذخیره ...');
|
|
|
|
var url = '?handler=DeleteCatCorrection';
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: url,
|
|
data: {
|
|
catid: id,
|
|
},
|
|
error: function () {
|
|
alert('خطا رخ داد.')
|
|
},
|
|
success: function () {
|
|
location.reload(true);
|
|
},
|
|
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<table>
|
|
<tr>
|
|
<td colspan="2">ویرایشهای بررسی نشدهٔ من</td>
|
|
</tr>
|
|
|
|
<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>
|
|
}
|
|
|
|
<tr>
|
|
<td colspan="2" class="td-button-container">
|
|
<a role="button" id="deletecorrections" class="editor-button background-red" onclick="deleteCatCorrection(@Model.PageInformation.PoetOrCat.Cat.Id)">انصراف و حذف این ویرایش</a>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
}
|
|
|
|
<form method="post">
|
|
<table style="width:100%" class="noborder">
|
|
<tr>
|
|
<td>
|
|
<span class="inputlabel">متن: </span>
|
|
</td>
|
|
<td>
|
|
<input asp-for="Correction.CatId" type="hidden" />
|
|
<textarea asp-for="Correction.DescriptionHtml" rows="30" class="editor width-100per"></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="inputlabel">توضیح این ویرایش: </span>
|
|
</td>
|
|
<td>
|
|
<input asp-for="Correction.Note" />
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<button type="submit" name="approve" id="approve" style="width:100%;color:white;background-color:green">ذخیره</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|