207 lines
7.8 KiB
Plaintext
207 lines
7.8 KiB
Plaintext
@page
|
|
@model GanjooRazor.Areas.Admin.Pages.ReviewPartEditsModel
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@using DNTPersianUtils.Core
|
|
@{
|
|
Layout = "_AdminLayout";
|
|
ViewData["Title"] = "بازبینی ویرایشهای قطعات";
|
|
}
|
|
|
|
<h1>@ViewData["Title"]</h1>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.FatalError))
|
|
{
|
|
<p>@Model.FatalError</p>
|
|
}
|
|
else if (@Model.Correction == null)
|
|
{
|
|
<p>ویرایشی وجود ندارد.</p>
|
|
}
|
|
else
|
|
{
|
|
<script>
|
|
function moderateSectionCorrections(correctionId) {
|
|
|
|
$('#moderatecorrections').hide();
|
|
$('#saving').text('در حال بررسی ...');
|
|
|
|
|
|
|
|
|
|
var rhythmReviewResult = 'DontCare';
|
|
if ($('#rhythm_review_result_Approved').length > 0) {
|
|
rhythmReviewResult = $('input[name=rhythm_review_result]:checked').val()
|
|
}
|
|
|
|
|
|
|
|
|
|
var url = '?handler=SendCorrectionsModeration';
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: url,
|
|
data: {
|
|
correctionId: correctionId,
|
|
rhythmReviewResult: rhythmReviewResult,
|
|
titleReviewNote: $('#title_review_note') == null? null : $('#title_review_note').val(),
|
|
},
|
|
success: function () {
|
|
location.reload(true);
|
|
},
|
|
error: function (e) {
|
|
if (e.responseText == null)
|
|
alert(e);
|
|
else
|
|
alert(e.responseText);
|
|
$('#moderatecorrections').show();
|
|
$('#saving').text('');
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
</script>
|
|
|
|
<p><a role="button" target="_blank" href="@Model.PageInformation.FullUrl" class="actionlink">@Model.PageInformation.FullTitle</a></p>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
پیشنهاد دهنده:
|
|
</td>
|
|
<td>
|
|
<a href="/hashieha/?userid=@Model.Correction.UserId" target="_blank">@Model.Correction.UserNickname</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a role="button" id="moderatecorrections" style="cursor:pointer;width:100%;color:white;background-color:green;display:block" onclick="moderateSectionCorrections(@Model.PageInformation.Poem.Verses.Length, @Model.Correction.Id)">بررسی</a>
|
|
</td>
|
|
<td>
|
|
<form method="post">
|
|
<button type="submit" name="next" id="next" style="width:100%;color:white;background-color:orange">بعدی</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
زمان:
|
|
</td>
|
|
<td>
|
|
@Model.Correction.Date.ToFriendlyPersianDateTextify()
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
تعداد کل:
|
|
</td>
|
|
<td>
|
|
@Model.TotalCount
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan=2>
|
|
<a role="button" onclick="checkAllNotCorrect()" class="pagebutton">درست نیست</a>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2"><p id="saving"> </p></td>
|
|
</tr>
|
|
@if (Model.TextSourceImage != null)
|
|
{
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="related-images">
|
|
<div class="related-image-container">
|
|
<a target="_blank" href="@Html.Raw(Model.TextSourceImage.TargetPageUrl)">
|
|
<img src="@Html.Raw(Model.TextSourceImage.ThumbnailImageUrl)" alt="@Model.TextSourceImage.AltText" loading="lazy" width="200" class="related-image">
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
@if (Model.Correction.Rhythm != null)
|
|
{
|
|
<tr>
|
|
<td colspan="2">
|
|
وزن
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
@Html.Raw(Model.PoemSection.HtmlText)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>متن اولیه</td>
|
|
<td>پیشنهاد</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p style="color:red">@Model.Correction.OriginalRhythm</p>
|
|
</td>
|
|
<td>
|
|
<p style="color:green">@Model.Correction.Rhythm</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
|
|
@if (Model.Correction.RhythmResult == RMuseum.Models.Ganjoor.CorrectionReviewResult.NotChanged)
|
|
{
|
|
<input type="radio" id="rhythm_review_result_Approved" name="rhythm_review_result" class="radio-approved" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.Approved">
|
|
<label for="rhythm_review_result_Approved">تأیید میشود</label>
|
|
|
|
<br>
|
|
<input type="radio" id="rhythm_review_result_NotChanged" name="rhythm_review_result" class="radio-notchanged" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.NotChanged" checked="checked">
|
|
}
|
|
else
|
|
{
|
|
<input type="radio" id="rhythm_review_result_Approved" name="rhythm_review_result" class="radio-approved" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.Approved" checked="checked">
|
|
<label for="rhythm_review_result_Approved">تأیید میشود</label>
|
|
|
|
<br>
|
|
<input type="radio" id="rhythm_review_result_NotChanged" name="rhythm_review_result" class="radio-notchanged" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.NotChanged">
|
|
}
|
|
<label for="rhythm_review_result_NotChanged">تغییری نکرده</label><br>
|
|
<input type="radio" id="rhythm_review_result_RejectedBecauseWrong" name="rhythm_review_result" class="radio-notcorrect" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.RejectedBecauseWrong">
|
|
<label for="rhythm_review_result_RejectedBecauseWrong">درست نیست</label><br>
|
|
<input type="radio" id="rhythm_review_result_RejectedBecauseVariant" name="rhythm_review_result" class="radio-variant" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.RejectedBecauseVariant">
|
|
<label for="rhythm_review_result_RejectedBecauseVariant">مربوط به نسخهٔ دیگری است</label><br>
|
|
<input type="radio" id="rhythm_review_result_RejectedBecauseUnnecessaryChange" name="rhythm_review_result" class="radio-unnecessary" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.RejectedBecauseUnnecessaryChange">
|
|
<label for="rhythm_review_result_RejectedBecauseUnnecessaryChange">تغییر سلیقهای یا بی دلیل است</label><br>
|
|
<input type="radio" id="rhythm_review_result_Rejected" name="rhythm_review_result" class="radio-rejected" value="@RMuseum.Models.Ganjoor.CorrectionReviewResult.Rejected">
|
|
<label for="rhythm_review_result_Rejected">به دلیل دیگری رد میشود</label><br>
|
|
<input type="text" id="title_review_note" name="title_review_note" value="" size="50" />
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(Model.Correction.Note))
|
|
{
|
|
<tr>
|
|
<td>یادداشت:</td>
|
|
<td>
|
|
@Model.Correction.Note
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
}
|