#421 geo tag moderation
This commit is contained in:
parent
9872a4b772
commit
6d2f59aa22
@ -264,14 +264,46 @@ else
|
||||
<td colspan="2">
|
||||
@if (Model.Correction.VerseOrderText.Any(v => v.OriginalText != v.Text))
|
||||
{
|
||||
<span class="up-badge up-badge--success">ویرایش متن</span>
|
||||
<span class="up-badge up-badge--success">ویرایش متن دارد</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>ویرایش متن ندارد</text>
|
||||
}
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
@if (Model.Correction.Title != null)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">تغییر عنوان دارد</span>
|
||||
}
|
||||
@if (Model.Correction.PoemSummary != null)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">تغییر خلاصه دارد</span>
|
||||
}
|
||||
@if (Model.Correction.Rhythm != null)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">تغییر وزن دارد</span>
|
||||
}
|
||||
@if (Model.Correction.Rhythm2 != null)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">تغییر وزن دوم دارد</span>
|
||||
}
|
||||
@if (Model.Correction.RhymeLetters != null)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">تغییر قافیه و ردیف دارد</span>
|
||||
}
|
||||
@if (Model.Correction.PoemFormat != null)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">تغییر قالب شعری دارد</span>
|
||||
}
|
||||
@if (Model.Correction.GeoDateTags != null && Model.Correction.GeoDateTags.Length > 0)
|
||||
{
|
||||
<span class="up-badge up-badge--primary">برچسب جغرافیایی/تاریخی دارد (@Model.Correction.GeoDateTags.Length.ToPersianNumbers())</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@ -276,6 +276,16 @@
|
||||
container.innerHTML = html;
|
||||
}
|
||||
|
||||
// the pending-suggestions table sits above the "add a new tag" card, so after adding/removing
|
||||
// a row from it the change happens off-screen if the user is scrolled down to the form - jump
|
||||
// them to the table so they can see what just happened
|
||||
function scrollToPendingGeoDateTags() {
|
||||
var container = document.getElementById('pending-geotag-suggestions');
|
||||
if (container && container.innerHTML.trim() != '') {
|
||||
container.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
|
||||
function removeGeoDateTagSuggestion(index) {
|
||||
geoDateTagSuggestions.splice(index, 1);
|
||||
renderPendingGeoDateTags();
|
||||
@ -288,6 +298,7 @@
|
||||
});
|
||||
$(el).closest('tr').hide();
|
||||
renderPendingGeoDateTags();
|
||||
scrollToPendingGeoDateTags();
|
||||
}
|
||||
|
||||
// Reads the "add a new tag" form. Returns a tag object if it has
|
||||
@ -368,6 +379,7 @@
|
||||
resetGeoDateTagForm();
|
||||
|
||||
renderPendingGeoDateTags();
|
||||
scrollToPendingGeoDateTags();
|
||||
upToast('به فهرست پیشنهادها افزوده شد. برای ثبت نهایی، دکمهٔ «ذخیره» را بزنید.');
|
||||
}
|
||||
|
||||
@ -442,6 +454,7 @@
|
||||
geoDateTagSuggestions.push(unstagedGeoDateTag);
|
||||
resetGeoDateTagForm();
|
||||
renderPendingGeoDateTags();
|
||||
scrollToPendingGeoDateTags();
|
||||
}
|
||||
|
||||
if (verseOrderText.length == 0 && verseOrderSummaries.length == 0 && geoDateTagSuggestions.length == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user