diff --git a/GanjooRazor/Areas/Admin/Pages/Donations.cshtml b/GanjooRazor/Areas/Admin/Pages/Donations.cshtml index 1dcafc61..eae4bdfd 100644 --- a/GanjooRazor/Areas/Admin/Pages/Donations.cshtml +++ b/GanjooRazor/Areas/Admin/Pages/Donations.cshtml @@ -1,75 +1,63 @@ -@page +@page @model GanjooRazor.Areas.Admin.Pages.DonationsModel @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ Layout = "_AdminLayout"; ViewData["Title"] = "کمک‌های مالی"; } +
+

@ViewData["Title"]

+
-

@ViewData["Title"]

- - - -

@Model.LastMessage

+@if (!string.IsNullOrEmpty(Model.LastMessage)) +{ +
@Model.LastMessage
+} @if (!string.IsNullOrEmpty(Model.EmailContent)) { - +
+ + +
} @if (Model.Donation != null) { -
- - - - - - - - - - - - - - - - - - - - - - -
- تاریخ: - - -
- مبلغ: - - -
- واحد: - - -
- اهدا کننده: - - -
- -
- -
+
+

کمک مالی جدید

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
} - - -

مشاهدهٔ صفحه

-

@Model.ShowAccountInfo

-

بازسازی صفحهٔ کمک‌ها

+
+ مشاهدهٔ صفحه + بازسازی صفحهٔ کمک‌ها +
+@if (!string.IsNullOrEmpty(Model.ShowAccountInfo)) +{ +

@Model.ShowAccountInfo

+} @if (Model.Donations != null) { @@ -78,9 +66,7 @@ تاریخ مبلغ اهدا کننده - - # - + # @foreach (var donation in Model.Donations) { @@ -89,9 +75,9 @@ @donation.AmountString @donation.DonorName - ✎ - 🗑 - # + ✎ + 🗑 + # } diff --git a/GanjooRazor/Areas/Admin/Pages/Expenses.cshtml b/GanjooRazor/Areas/Admin/Pages/Expenses.cshtml index e2182b15..fd39c036 100644 --- a/GanjooRazor/Areas/Admin/Pages/Expenses.cshtml +++ b/GanjooRazor/Areas/Admin/Pages/Expenses.cshtml @@ -1,63 +1,52 @@ -@page +@page @model GanjooRazor.Areas.Admin.Pages.ExpensesModel @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ Layout = "_AdminLayout"; ViewData["Title"] = "هزینه‌ها"; } +
+

@ViewData["Title"]

+
-

@ViewData["Title"]

+@if (!string.IsNullOrEmpty(Model.LastMessage)) +{ +
@Model.LastMessage
+} -

@Model.LastMessage

+
+

هزینهٔ جدید

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
-
- - - - - - - - - - - - - - - - - - - - - - -
- تاریخ: - - -
- مبلغ: - - -
- واحد: - - -
- شرح: - - -
- -
- -
- -

مشاهدهٔ صفحه

-

@Model.ShowAccountInfo

-

بازسازی صفحهٔ کمک‌ها

+
+ مشاهدهٔ صفحه + بازسازی صفحهٔ کمک‌ها +
+@if (!string.IsNullOrEmpty(Model.ShowAccountInfo)) +{ +

@Model.ShowAccountInfo

+} @if (Model.Expenses != null) { @@ -66,9 +55,7 @@ تاریخ مبلغ شرح - - # - + # @foreach (var expense in Model.Expenses) { @@ -77,12 +64,10 @@ @RMuseum.Services.Implementation.LanguageUtils.FormatMoney(expense.Amount) @expense.Description - ✎ - 🗑 + ✎ + 🗑 } - - } diff --git a/GanjooRazor/Areas/Admin/Pages/LongRunningJobs.cshtml b/GanjooRazor/Areas/Admin/Pages/LongRunningJobs.cshtml index 205c9772..f923e694 100644 --- a/GanjooRazor/Areas/Admin/Pages/LongRunningJobs.cshtml +++ b/GanjooRazor/Areas/Admin/Pages/LongRunningJobs.cshtml @@ -1,27 +1,29 @@ -@page +@page @model GanjooRazor.Areas.Admin.Pages.LongRunningJobsModel @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ Layout = "_AdminLayout"; ViewData["Title"] = "کارهای جاری"; } +
+

@ViewData["Title"]

+
-

@ViewData["Title"]

- -

@Model.LastMessage

+@if (!string.IsNullOrEmpty(Model.LastMessage)) +{ +
@Model.LastMessage
+} - - @if (Model.Jobs != null) { +
+ حذف کارهای قدیمی +
+ @@ -64,11 +66,6 @@ - - - @foreach (var job in Model.Jobs) { @@ -79,20 +76,15 @@ - - - } - @if (Model.Jobs.Length > 0) - { - - + }
کارخطا #
- حذف کارهای قدیمی -
@job.LastUpdate @job.Succeeded @job.Exception
- حذف کارهای قدیمی -
- + @if (Model.Jobs.Length > 0) + { +
+ حذف کارهای قدیمی +
+ } } - - diff --git a/GanjooRazor/Areas/Admin/Pages/Poets.cshtml b/GanjooRazor/Areas/Admin/Pages/Poets.cshtml index 27fb7fec..df64dab7 100644 --- a/GanjooRazor/Areas/Admin/Pages/Poets.cshtml +++ b/GanjooRazor/Areas/Admin/Pages/Poets.cshtml @@ -1,19 +1,24 @@ -@page +@page @model GanjooRazor.Areas.Admin.Pages.PoetsModel @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ Layout = "_AdminLayout"; ViewData["Title"] = "مدیریت سخنوران"; } +
+

@ViewData["Title"]

+
-

@ViewData["Title"]

- -

@Model.LastMessage

+@if (!string.IsNullOrEmpty(Model.LastMessage)) +{ +
@Model.LastMessage
+} +
+ سخنور جدید + ذخیرهٔ گروه‌بندی بر اساس قرن +
+ @@ -65,14 +70,6 @@ - - - - - - @foreach (var poet in Model.Poets) { @@ -90,7 +87,6 @@ { } - - @@ -125,7 +120,6 @@ { } - } } @@ -160,17 +154,12 @@ }
نام سخنوردرگذشته چسبانی
سخنور جدید
- ذخیرهٔ گروه‌بندی بر اساس قرن -
@@ -103,7 +99,6 @@ }
- ذخیرهٔ @poet.Nickname + ذخیرهٔ @poet.Nickname
- - - - - - - -
sqlite
\ No newline at end of file +
+ sqlite +
diff --git a/GanjooRazor/Pages/Shared/_AdminLayout.cshtml b/GanjooRazor/Pages/Shared/_AdminLayout.cshtml index 7a7b62f8..440c0fad 100644 --- a/GanjooRazor/Pages/Shared/_AdminLayout.cshtml +++ b/GanjooRazor/Pages/Shared/_AdminLayout.cshtml @@ -53,18 +53,20 @@ url: $(urlInput).val(), active: $(activeInput).is(":checked") }, + error: function (e) { + upToast(e.responseText || 'خطا رخ داد.', 'error'); + }, success: function() { - alert('آگاهی به درستی ویرایش شد.') + upToast('آگاهی به درستی ویرایش شد.', 'success'); }, }); } - function deleteBanner(bannerId) { - - if (!confirm('آیا از حذف این آگاهی اطمینان دارید؟')) - return; + async function deleteBanner(bannerId) { + var ok = await upConfirm('آیا از حذف این آگاهی اطمینان دارید؟'); + if (!ok) return; $.ajax({ type: "DELETE", @@ -72,6 +74,9 @@ data: { id: bannerId }, + error: function (e) { + upToast(e.responseText || 'خطا رخ داد.', 'error'); + }, success: function() { var bannerIdBlockId = '#tr-' + bannerId; $(bannerIdBlockId).remove(); @@ -79,9 +84,9 @@ }); } - function rebuildDonationsPage() { - if (!confirm('آیا از بازسازی صفحهٔ کمک‌ها اطمینان دارید؟')) - return; + async function rebuildDonationsPage() { + var ok = await upConfirm('آیا از بازسازی صفحهٔ کمک‌ها اطمینان دارید؟'); + if (!ok) return; var url = '?handler=RebuildPage'; @@ -89,21 +94,20 @@ type: "POST", url: url, error: function() { - alert('خطا رخ داد.') + upToast('خطا رخ داد.', 'error'); }, success: function() { - alert('صفحه به درستی بازسازی شد.') + upToast('صفحه به درستی بازسازی شد.', 'success'); }, }); } - function deleteItem(itemId, itemName) { - - if (!confirm('آیا از حذف این ' + itemName + ' اطمینان دارید؟')) - return; + async function deleteItem(itemId, itemName) { + var ok = await upConfirm('آیا از حذف این ' + itemName + ' اطمینان دارید؟'); + if (!ok) return; $.ajax({ type: "DELETE", @@ -112,7 +116,7 @@ id: itemId }, error: function() { - alert('خطا رخ داد.'); + upToast('خطا رخ داد.', 'error'); }, success: function() { location.reload(); @@ -339,9 +343,9 @@ - function exportAll() { - if (!confirm('آیا از تولید مجدد همهٔ فایلهای گنجور رومیزی اطمینان دارید؟')) - return; + async function exportAll() { + var ok = await upConfirm('آیا از تولید مجدد همهٔ فایلهای گنجور رومیزی اطمینان دارید؟'); + if (!ok) return; var url = '?handler=ExportAll'; @@ -349,10 +353,10 @@ type: "POST", url: url, error: function() { - alert('خطا رخ داد.') + upToast('خطا رخ داد.', 'error'); }, success: function() { - alert('فرایند تولید مجدد همهٔ فایلهای گنجور رومیزی شروع شد.') + upToast('فرایند تولید مجدد همهٔ فایلهای گنجور رومیزی شروع شد.', 'success'); }, });