diff --git a/GanjooRazor/Areas/User/Pages/Section.cshtml b/GanjooRazor/Areas/User/Pages/Section.cshtml
index b4e06078..e9144109 100644
--- a/GanjooRazor/Areas/User/Pages/Section.cshtml
+++ b/GanjooRazor/Areas/User/Pages/Section.cshtml
@@ -6,11 +6,13 @@
ViewData["Title"] = "ویرایشگر قطعه";
await GanjooRazor.Utils.GanjoorSessionChecker.ApplyPermissionsToViewData(Request, Response, ViewData);
}
-
@ViewData["Title"]
+
@if (!string.IsNullOrEmpty(Model.FatalError))
{
- @Html.Raw(Model.FatalError)
+ @Html.Raw(Model.FatalError)
}
else
{
@@ -48,7 +50,7 @@ else
}
if (breakFromVIndices.length > 10) {
- alert('در هر نوبت حداکثر از ۱۰ محل میتوانید قطعه را بشکنید.');
+ upToast('در هر نوبت حداکثر از ۱۰ محل میتوانید قطعه را بشکنید.', 'error');
return;
}
@@ -73,7 +75,7 @@ else
}
if (breakFromVIndices.length == 0 && rhythm_new == null && rhyme_letters == null && section_lang == null && section_format == null) {
- alert('شما هیچ تغییری در متن ندادهاید!');
+ upToast('شما هیچ تغییری در متن ندادهاید!', 'error');
return;
}
@@ -102,10 +104,7 @@ else
location.reload(true);
},
error: function (e) {
- if (e.responseText == null)
- alert(e);
- else
- alert(e.responseText);
+ upToast(e.responseText || String(e), 'error');
$('#savecorrections').show();
$('#saving').text('');
}
@@ -123,10 +122,7 @@ else
id: sectionId
},
error: function (e) {
- if (e.responseText == null)
- alert(e);
- else
- alert(e.responseText);
+ upToast(e.responseText || String(e), 'error');
},
success: function (rhyme) {
$(elementId).val(rhyme);
@@ -135,104 +131,81 @@ else
});
}
- @Model.PageInformation.FullTitle
-
-
-
-
- همهٔ قطعات شعر
-
-
-
+ @Model.PageInformation.FullTitle
+
+
+
+ همهٔ قطعات شعر
+
@if (Model.Previous != null)
{
-
-
-
- قطعهٔ قبل
-
-
-
+
+ قطعهٔ قبل
+
}
@if (Model.Next != null)
{
-
-
-
- قطعهٔ بعد
-
-
-
+
+ قطعهٔ بعد
+
}
-
-
- @Html.Raw(Model.PoemSection.HtmlText)
-
-
-
-
-
- وزن فعلی:
-
-
-
-
- @(Model.PoemSection.GanjoorMetre == null ? "" : Model.PoemSection.GanjoorMetre.Rhythm)
-
-
-
-
- توجه داشته باشید که کارکرد برچسبگذاری اشعار در گنجور یافتن اشعار هموزن است. از این جهت از پیشنهاد صورتهای سلیقهای و متفاوت یک وزن خودداری کنید تا این قابلیت مختل نشود. این نکته را هم مد نظر داشته باشید.
-
-
-
-
- وزن ویراستهٔ من:
-
-
-
-
- جستجوی وزن:
-
-
- @if (Model.RhythmsByVerseCount != null)
- @foreach (var rhythm in Model.RhythmsByVerseCount)
- {
- @rhythm.Rhythm
- }
-
+
-
-
-
-
- وزن انتخاب شده:
-
-
- @foreach (var rhythm in Model.RhythmsAlphabetically)
+
+ @Html.Raw(Model.PoemSection.HtmlText)
+
+
+
+
وزن
+
+
+
وزن فعلی
+
@(Model.PoemSection.GanjoorMetre == null ? "" : Model.PoemSection.GanjoorMetre.Rhythm)
+
+
+
+
توجه داشته باشید که کارکرد برچسبگذاری اشعار در گنجور یافتن اشعار هموزن است. از این جهت از پیشنهاد صورتهای سلیقهای و متفاوت یک وزن خودداری کنید تا این قابلیت مختل نشود. این نکته را هم مد نظر داشته باشید.
+
+
+
+ جستجوی وزن
+
+
+ @if (Model.RhythmsByVerseCount != null)
+ @foreach (var rhythm in Model.RhythmsByVerseCount)
{
- if (Model.MyLastEdit != null && Model.MyLastEdit.Rhythm == rhythm.Rhythm)
+ @rhythm.Rhythm
+ }
+
+
+
+
+
وزن ویراستهٔ من
+
+ @foreach (var rhythm in Model.RhythmsAlphabetically)
+ {
+ if (Model.MyLastEdit != null && Model.MyLastEdit.Rhythm == rhythm.Rhythm)
+ {
+ @rhythm.Rhythm
+ }
+ else
+ {
+ if (Model.PoemSection.GanjoorMetre != null && Model.PoemSection.GanjoorMetre.Rhythm == rhythm.Rhythm)
{
- @rhythm.Rhythm
+ @(rhythm.Rhythm == "" ? "هیچکدام" : rhythm.Rhythm == "null" ? "وزنیابی نشده" : rhythm.Rhythm)
}
else
{
- if (Model.PoemSection.GanjoorMetre != null && Model.PoemSection.GanjoorMetre.Rhythm == rhythm.Rhythm)
- {
- @(rhythm.Rhythm == "" ? "هیچکدام" : rhythm.Rhythm == "null" ? "وزنیابی نشده" : rhythm.Rhythm)
- }
- else
- {
- @(rhythm.Rhythm == "" ? "هیچکدام" : rhythm.Rhythm == "null" ? "وزنیابی نشده" : rhythm.Rhythm)
- }
-
+ @(rhythm.Rhythm == "" ? "هیچکدام" : rhythm.Rhythm == "null" ? "وزنیابی نشده" : rhythm.Rhythm)
}
}
-
-
پاک کردن وزن
-
+
+ }
+
+
-
+
پیشنهاد وزن جدید
+
+
+
-
-
- حروف قافیهٔ فعلی:
-
-
+
+
قافیه
-
-
- @Model.PoemSection.RhymeLetters
-
-
+
+
حروف قافیهٔ فعلی
+
@Model.PoemSection.RhymeLetters
+
-
-
- حروف قافیهٔ پیشنهادی من (بدون فاصله و حرکات):
-
+
+
حروف قافیهٔ پیشنهادی من (بدون فاصله و حرکات)
+
-
+
محاسبه
+
+
+
-
-
-
- شکستن قطعه: اگر قطعه شامل بیش از یک قطعه شعر است و میبایست شکسته شود محل شکستن قطعه را علامت بزنید.
-
-
-
-
+
+
شکستن قطعه
+
اگر قطعه شامل بیش از یک قطعه شعر است و میبایست شکسته شود محل شکستن قطعه را علامت بزنید.
@for (int v = 0; v < Model.Verses.Count; v++)
{
if (v > 1 && Model.Verses[v].VersePosition != RMuseum.Models.Ganjoor.VersePosition.Left)
{
-
-
-
-
-
+
-
+
@Model.Verses[v].Text
+
+
+
}
else
{
-
-
- @Model.Verses[v].Text
-
-
+ @Model.Verses[v].Text
}
}
+
+
+
زبان
-
-
- زبان فعلی:
-
-
-
-
-
+
+
زبان فعلی
+
@RMuseum.Models.Ganjoor.GanjoorLanguage.LanguageNameFromCode(Model.Languages, Model.PoemSection.Language)
-
@Model.PoemSection.Language
-
-
+
@Model.PoemSection.Language
+
+
-
-
- زبان:
-
-
- @foreach (var lang in Model.Languages)
- {
- @if (Model.MyLastEdit != null && (Model.MyLastEdit.Language == lang.Code || (string.IsNullOrEmpty(Model.MyLastEdit.Language) && lang.Code == "fa-IR")))
- {
- @lang.Name
- }
- else if (Model.PoemSection.Language == lang.Code)
- {
- @lang.Name
- }
- else
- {
- @lang.Name
- }
- }
-
-
-
- @if(Model.CanEdit)
- {
-
-
- زبانها
-
-
- }
-
-
-
- قالب شعری فعلی:
-
-
-
-
-
- @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)Model.PoemSection.PoemFormat)
- @Model.PoemSection.PoemFormat
-
-
-
-
-
- قالب شعری:
-
-
- @foreach (var poemFormat in System.Enum.GetValues(typeof(RMuseum.Models.Ganjoor.GanjoorPoemFormat)))
- {
- @if (Model.MyLastEdit != null && (Model.MyLastEdit.PoemFormat == (RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat ))
- {
- @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
- }
- else if (Model.PoemSection.PoemFormat == (RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
- {
- @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
- }
- else
- {
- @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
- }
-
- }
-
-
-
-
-
-
-
-
- توضیح این ویرایش:
-
-
-
-
-
- @if (Model.MyLastEdit != null && !string.IsNullOrEmpty(Model.MyLastEdit.Note))
+
+ زبان
+
+ @foreach (var lang in Model.Languages)
{
-
+ @if (Model.MyLastEdit != null && (Model.MyLastEdit.Language == lang.Code || (string.IsNullOrEmpty(Model.MyLastEdit.Language) && lang.Code == "fa-IR")))
+ {
+ @lang.Name
+ }
+ else if (Model.PoemSection.Language == lang.Code)
+ {
+ @lang.Name
+ }
+ else
+ {
+ @lang.Name
+ }
}
- else
- {
-
- }
-
-
-
-
-
- ذخیره
-
-
-
-
-
-
-
- @if (Model.Previous != null)
- {
-
-
-
- قطعهٔ قبل
-
-
-
- }
- @if (Model.Next != null)
- {
-
-
-
- قطعهٔ بعد
-
-
-
- }
+
+
@if (Model.CanEdit)
{
-
- حذف قطعه
-
+ زبانها
}
-
+
+
+
+
قالب شعری
+
+
+
قالب شعری فعلی
+
+ @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)Model.PoemSection.PoemFormat)
+ @Model.PoemSection.PoemFormat
+
+
+
+
+ قالب شعری
+
+ @foreach (var poemFormat in System.Enum.GetValues(typeof(RMuseum.Models.Ganjoor.GanjoorPoemFormat)))
+ {
+ @if (Model.MyLastEdit != null && (Model.MyLastEdit.PoemFormat == (RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat ))
+ {
+ @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
+ }
+ else if (Model.PoemSection.PoemFormat == (RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
+ {
+ @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
+ }
+ else
+ {
+ @RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)poemFormat)
+ }
+
+ }
+
+
+
+
+
+
+ توضیح این ویرایش
+ @if (Model.MyLastEdit != null && !string.IsNullOrEmpty(Model.MyLastEdit.Note))
+ {
+
+ }
+ else
+ {
+
+ }
+
+
+
+
+
+
+
}
diff --git a/GanjooRazor/wwwroot/css/user-panel.css b/GanjooRazor/wwwroot/css/user-panel.css
index 77467528..64d122c0 100644
--- a/GanjooRazor/wwwroot/css/user-panel.css
+++ b/GanjooRazor/wwwroot/css/user-panel.css
@@ -469,20 +469,32 @@ body.up-modal-open {
transform: translateY(-2px);
}
-/* ---------- moderation review-result radio options ---------- */
+/* ---------- moderation review-result radio options / generic checkbox rows ---------- */
-.up-radio-option {
+.up-radio-option,
+.up-check-row {
display: flex;
align-items: center;
gap: var(--up-space-1);
padding: 3px 0;
}
-.up-radio-option label {
+.up-radio-option label,
+.up-check-row label {
margin: 0;
cursor: pointer;
}
+.up-verse-row {
+ padding: 6px 0;
+ border-bottom: 1px solid var(--up-border);
+ line-height: 1.9;
+}
+
+.up-verse-row:last-child {
+ border-bottom: none;
+}
+
/* ---------- small utilities ---------- */
.up-mt-0 { margin-top: 0; }