Browse Source
implements filter by status to index page
pull/12087/head
Musa Demir
5 years ago
No known key found for this signature in database
GPG Key ID: 117DF92322553DC8
4 changed files with
23 additions and
9 deletions
-
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml
-
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/index.js
-
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json
-
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json
|
|
|
@ -5,6 +5,7 @@ |
|
|
|
@using Volo.CmsKit.Admin.Web.Pages |
|
|
|
@using Volo.CmsKit.Admin.Web.Menus |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageToolbar |
|
|
|
@using Volo.CmsKit.Blogs |
|
|
|
|
|
|
|
@inherits CmsKitAdminPageBase |
|
|
|
|
|
|
|
@ -27,7 +28,6 @@ |
|
|
|
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new {pageName = typeof(IndexModel).FullName}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
<div class="alert alert-warning" style="display: none" role="alert" id="alertHasBlogPostWaitingForReview"> |
|
|
|
<abp-button button-type="Link" type="button" text="@L["HasBlogPostWaitingForReviewMessage"].Value" id="button-show-waiting-for-review"/> |
|
|
|
</div> |
|
|
|
@ -36,7 +36,16 @@ |
|
|
|
<abp-card-body> |
|
|
|
<div id="CmsKitBlogPostsWrapper"> |
|
|
|
<abp-row> |
|
|
|
<abp-column> |
|
|
|
<abp-column size="_2"> |
|
|
|
<select id="StatusSelect" class="form-control"> |
|
|
|
<option value="">@L["SelectAStatus"]</option> |
|
|
|
@foreach (var status in (BlogPostStatus[]) Enum.GetValues(typeof(BlogPostStatus))) |
|
|
|
{ |
|
|
|
<option value="@((int)status)">@L["CmsKit.BlogPost.Status." + (int)status]</option> |
|
|
|
} |
|
|
|
</select> |
|
|
|
</abp-column> |
|
|
|
<abp-column size="_10"> |
|
|
|
@await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent)) |
|
|
|
</abp-column> |
|
|
|
</abp-row> |
|
|
|
|
|
|
|
@ -1,6 +1,8 @@ |
|
|
|
|
|
|
|
$(function () { |
|
|
|
var l = abp.localization.getResource("CmsKit"); |
|
|
|
var $statusFilter = $("#StatusSelect"); |
|
|
|
|
|
|
|
var blogPostStatus = { |
|
|
|
Draft: 0, |
|
|
|
Published: 1, |
|
|
|
@ -8,15 +10,14 @@ $(function () { |
|
|
|
}; |
|
|
|
|
|
|
|
var blogsService = volo.cmsKit.admin.blogs.blogPostAdmin; |
|
|
|
var _statusFilter; |
|
|
|
|
|
|
|
var getFilter = function () { |
|
|
|
var filter = { |
|
|
|
filter: $('#CmsKitBlogPostsWrapper input.page-search-filter-text').val() |
|
|
|
}; |
|
|
|
|
|
|
|
if (_statusFilter) { |
|
|
|
filter.status = _statusFilter; |
|
|
|
_statusFilter = null; |
|
|
|
if ($statusFilter.val()) { |
|
|
|
filter.status = $statusFilter.val(); |
|
|
|
} |
|
|
|
|
|
|
|
return filter; |
|
|
|
@ -161,7 +162,7 @@ $(function () { |
|
|
|
|
|
|
|
$('#button-show-waiting-for-review').on('click', function (e) { |
|
|
|
e.preventDefault(); |
|
|
|
_statusFilter = blogPostStatus.SendToReview; |
|
|
|
$statusFilter.val(blogPostStatus.SendToReview); |
|
|
|
dataTable.ajax.reload(); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@ -179,6 +179,8 @@ |
|
|
|
"SendToReview": "Send to review", |
|
|
|
"SendToReviewToPublish": "Send to review to publish", |
|
|
|
"BlogPostSendToReviewSuccessMessage": "The blog post \"{0}\" has been sent to admin review for publishing.", |
|
|
|
"HasBlogPostWaitingForReviewMessage": "You have a blog post waiting for review. Click to list." |
|
|
|
"HasBlogPostWaitingForReviewMessage": "You have a blog post waiting for review. Click to list.", |
|
|
|
"SelectAStatus": "Select a status", |
|
|
|
"Status": "Status" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -178,6 +178,8 @@ |
|
|
|
"SendToReview": "İncelemeye gönder", |
|
|
|
"SendToReviewToPublish": "Yayınlamak için admin incelemesine gönder", |
|
|
|
"BlogPostSendToReviewSuccessMessage": "\"{0}\" başlıklı gönderiyi yayınlamak için admin incelemesine gönderildi.", |
|
|
|
"HasBlogPostWaitingForReviewMessage": "Yayınlanmak için onay bekleyen blog postlar var! Listelemek için tıklayın." |
|
|
|
"HasBlogPostWaitingForReviewMessage": "Yayınlanmak için onay bekleyen blog postlar var! Listelemek için tıklayın.", |
|
|
|
"SelectAStatus": "Durum seçin", |
|
|
|
"Status": "Durum" |
|
|
|
} |
|
|
|
} |
|
|
|
|