mirror of https://github.com/abpframework/abp.git
44 changed files with 2735 additions and 3292 deletions
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,9 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Volo.CmsKit.Admin.Comments; |
|||
public class SettingsDto |
|||
{ |
|||
public bool RequireApprovement { get; set; } |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Admin.Comments; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Admin.Comments; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(ICommentApprovedSettingService), typeof(CommentApprovedAdminClientProxy))] |
|||
public partial class CommentApprovedAdminClientProxy : ClientProxyBase<ICommentApprovedSettingService>, ICommentApprovedSettingService |
|||
{ |
|||
public virtual async Task CreateCommentApprovedStateAsync(bool isApproved) |
|||
{ |
|||
await RequestAsync(nameof(CreateCommentApprovedStateAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(bool), isApproved } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<bool?> GetAsync() |
|||
{ |
|||
return await RequestAsync<bool?>(nameof(GetAsync)); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of CommentApprovedAdminClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Admin.Comments; |
|||
|
|||
public partial class CommentApprovedAdminClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Contents; |
|||
using Volo.CmsKit.Public.Blogs; |
|||
using Volo.CmsKit.Users; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Blogs; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(IBlogPostPublicAppService), typeof(BlogPostPublicClientProxy))] |
|||
public partial class BlogPostPublicClientProxy : ClientProxyBase<IBlogPostPublicAppService>, IBlogPostPublicAppService |
|||
{ |
|||
public virtual async Task<BlogPostCommonDto> GetAsync(string blogSlug, string blogPostSlug) |
|||
{ |
|||
return await RequestAsync<BlogPostCommonDto>(nameof(GetAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), blogSlug }, |
|||
{ typeof(string), blogPostSlug } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<PagedResultDto<BlogPostCommonDto>> GetListAsync(string blogSlug, BlogPostGetListInput input) |
|||
{ |
|||
return await RequestAsync<PagedResultDto<BlogPostCommonDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), blogSlug }, |
|||
{ typeof(BlogPostGetListInput), input } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<PagedResultDto<CmsUserDto>> GetAuthorsHasBlogPostsAsync(BlogPostFilteredPagedAndSortedResultRequestDto input) |
|||
{ |
|||
return await RequestAsync<PagedResultDto<CmsUserDto>>(nameof(GetAuthorsHasBlogPostsAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(BlogPostFilteredPagedAndSortedResultRequestDto), input } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<CmsUserDto> GetAuthorHasBlogPostAsync(Guid id) |
|||
{ |
|||
return await RequestAsync<CmsUserDto>(nameof(GetAuthorHasBlogPostAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(Guid), id } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task DeleteAsync(Guid id) |
|||
{ |
|||
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(Guid), id } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<string> GetTagNameAsync(Guid tagId) |
|||
{ |
|||
return await RequestAsync<string>(nameof(GetTagNameAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(Guid), tagId } |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of BlogPostPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Blogs; |
|||
|
|||
public partial class BlogPostPublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Public.Comments; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Comments; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))] |
|||
public partial class CommentPublicClientProxy : ClientProxyBase<ICommentPublicAppService>, ICommentPublicAppService |
|||
{ |
|||
public virtual async Task<ListResultDto<CommentWithDetailsDto>> GetListAsync(string entityType, string entityId) |
|||
{ |
|||
return await RequestAsync<ListResultDto<CommentWithDetailsDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<CommentDto> CreateAsync(string entityType, string entityId, CreateCommentInput input) |
|||
{ |
|||
return await RequestAsync<CommentDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId }, |
|||
{ typeof(CreateCommentInput), input } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<CommentDto> UpdateAsync(Guid id, UpdateCommentInput input) |
|||
{ |
|||
return await RequestAsync<CommentDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(Guid), id }, |
|||
{ typeof(UpdateCommentInput), input } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task DeleteAsync(Guid id) |
|||
{ |
|||
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(Guid), id } |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of CommentPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Comments; |
|||
|
|||
public partial class CommentPublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Public.GlobalResources; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.GlobalResources; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(IGlobalResourcePublicAppService), typeof(GlobalResourcePublicClientProxy))] |
|||
public partial class GlobalResourcePublicClientProxy : ClientProxyBase<IGlobalResourcePublicAppService>, IGlobalResourcePublicAppService |
|||
{ |
|||
public virtual async Task<GlobalResourceDto> GetGlobalScriptAsync() |
|||
{ |
|||
return await RequestAsync<GlobalResourceDto>(nameof(GetGlobalScriptAsync)); |
|||
} |
|||
|
|||
public virtual async Task<GlobalResourceDto> GetGlobalStyleAsync() |
|||
{ |
|||
return await RequestAsync<GlobalResourceDto>(nameof(GetGlobalStyleAsync)); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of GlobalResourcePublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.GlobalResources; |
|||
|
|||
public partial class GlobalResourcePublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Menus; |
|||
using Volo.CmsKit.Public.Menus; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Menus; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(IMenuItemPublicAppService), typeof(MenuItemPublicClientProxy))] |
|||
public partial class MenuItemPublicClientProxy : ClientProxyBase<IMenuItemPublicAppService>, IMenuItemPublicAppService |
|||
{ |
|||
public virtual async Task<List<MenuItemDto>> GetListAsync() |
|||
{ |
|||
return await RequestAsync<List<MenuItemDto>>(nameof(GetListAsync)); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of MenuItemPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Menus; |
|||
|
|||
public partial class MenuItemPublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Contents; |
|||
using Volo.CmsKit.Public.Pages; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Pages; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(IPagePublicAppService), typeof(PagesPublicClientProxy))] |
|||
public partial class PagesPublicClientProxy : ClientProxyBase<IPagePublicAppService>, IPagePublicAppService |
|||
{ |
|||
public virtual async Task<PageDto> FindBySlugAsync(string slug) |
|||
{ |
|||
return await RequestAsync<PageDto>(nameof(FindBySlugAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), slug } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<PageDto> FindDefaultHomePageAsync() |
|||
{ |
|||
return await RequestAsync<PageDto>(nameof(FindDefaultHomePageAsync)); |
|||
} |
|||
|
|||
public virtual async Task<bool> DoesSlugExistAsync(string slug) |
|||
{ |
|||
return await RequestAsync<bool>(nameof(DoesSlugExistAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), slug } |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of PagesPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Pages; |
|||
|
|||
public partial class PagesPublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Public.Ratings; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Ratings; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))] |
|||
public partial class RatingPublicClientProxy : ClientProxyBase<IRatingPublicAppService>, IRatingPublicAppService |
|||
{ |
|||
public virtual async Task<RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input) |
|||
{ |
|||
return await RequestAsync<RatingDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId }, |
|||
{ typeof(CreateUpdateRatingInput), input } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task DeleteAsync(string entityType, string entityId) |
|||
{ |
|||
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<List<RatingWithStarCountDto>> GetGroupedStarCountsAsync(string entityType, string entityId) |
|||
{ |
|||
return await RequestAsync<List<RatingWithStarCountDto>>(nameof(GetGroupedStarCountsAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId } |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of RatingPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Ratings; |
|||
|
|||
public partial class RatingPublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Public.Reactions; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Reactions; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(IReactionPublicAppService), typeof(ReactionPublicClientProxy))] |
|||
public partial class ReactionPublicClientProxy : ClientProxyBase<IReactionPublicAppService>, IReactionPublicAppService |
|||
{ |
|||
public virtual async Task<ListResultDto<ReactionWithSelectionDto>> GetForSelectionAsync(string entityType, string entityId) |
|||
{ |
|||
return await RequestAsync<ListResultDto<ReactionWithSelectionDto>>(nameof(GetForSelectionAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task CreateAsync(string entityType, string entityId, string reaction) |
|||
{ |
|||
await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId }, |
|||
{ typeof(string), reaction } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task DeleteAsync(string entityType, string entityId, string reaction) |
|||
{ |
|||
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId }, |
|||
{ typeof(string), reaction } |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of ReactionPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Reactions; |
|||
|
|||
public partial class ReactionPublicClientProxy |
|||
{ |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.CmsKit.Tags; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Tags; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(ITagAppService), typeof(TagPublicClientProxy))] |
|||
public partial class TagPublicClientProxy : ClientProxyBase<ITagAppService>, ITagAppService |
|||
{ |
|||
public virtual async Task<List<TagDto>> GetAllRelatedTagsAsync(string entityType, string entityId) |
|||
{ |
|||
return await RequestAsync<List<TagDto>>(nameof(GetAllRelatedTagsAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(string), entityId } |
|||
}); |
|||
} |
|||
|
|||
public virtual async Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount) |
|||
{ |
|||
return await RequestAsync<List<PopularTagDto>>(nameof(GetPopularTagsAsync), new ClientProxyRequestTypeValue |
|||
{ |
|||
{ typeof(string), entityType }, |
|||
{ typeof(int), maxCount } |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
// This file is part of TagPublicClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Volo.CmsKit.Public.Tags; |
|||
|
|||
public partial class TagPublicClientProxy |
|||
{ |
|||
} |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,12 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.CmsKit.Admin.Web.Components.MySettingGroup; |
|||
|
|||
public class CommentSettingViewComponent: AbpViewComponent |
|||
{ |
|||
public virtual IViewComponentResult Invoke() |
|||
{ |
|||
return View("~/Components/CommentsSetting/Index.cshtml"); |
|||
} |
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
@* |
|||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 |
|||
|
|||
*@ |
|||
|
|||
@section scripts { |
|||
<abp-script-bundle> |
|||
<abp-script src="/client-proxies/cms-kit-admin-proxy.js" /> |
|||
<abp-script src="/client-proxies/cms-kit-common-proxy.js" /> |
|||
@* <abp-script src="" /> *@ |
|||
<script src="/Components/CommentsSetting/index.js"></script> |
|||
</abp-script-bundle> |
|||
} |
|||
@{ |
|||
// <p>sdf</p> |
|||
// <input type="checkbox" id="checkbox" /> |
|||
// <button id="save">Save</button> |
|||
<abp-form #form="ngForm"> |
|||
<h4>Checkbox Ayarları</h4> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<div class="form-check"> |
|||
<input type="checkbox" id="checkbox" class="form-check-input" name="checkbox" ngModel /> |
|||
<label for="checkbox" class="form-check-label">Açıklama:</label> |
|||
</div> |
|||
<small id="checkboxHelp" class="form-text text-muted">Checkbox açıklama metni buraya gelecek.</small> |
|||
</div> |
|||
|
|||
<div style="float:right" class="text-right mt-3"> |
|||
<abp-button id="save" type="submit" class="btn btn-primary"> |
|||
Kaydet |
|||
</abp-button> |
|||
</div> |
|||
</abp-form> |
|||
|
|||
|
|||
|
|||
} |
|||
@* <script> |
|||
var service = volo.cmsKit.admin.comments.commentAdmin; |
|||
|
|||
$(document).ready(function () { |
|||
service.getSettings().done(function (response) { |
|||
var isChecked = response.requireApprovement |
|||
$('#checkbox').prop('checked', isChecked); |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response.requireApprovement); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu alınırken bir hata oluştu:', error); |
|||
}); |
|||
|
|||
$('#save').click(function () { |
|||
var isChecked = $('#checkbox').prop('checked'); |
|||
|
|||
service.setSettings({ RequireApprovement: isChecked }).done(function (response) { |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response); |
|||
alert('CheckBox durumu başarıyla kaydedildi.'); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu güncellenirken bir hata oluştu:', error); |
|||
alert('CheckBox durumu kaydedilirken bir hata oluştu.'); |
|||
}); |
|||
}); |
|||
}); |
|||
</script> *@ |
|||
@* <script> |
|||
var _service = volo.cmsKit.admin.comments.commentAdmin; |
|||
$(document).ready(function () { |
|||
_service.getSettings().done(function (response) { |
|||
var isChecked = response.requireApprovement; |
|||
$('#checkbox').prop('checked', isChecked); |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response.requireApprovement); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu alınırken bir hata oluştu:', error); |
|||
}); |
|||
$('#save').click(function () { |
|||
var isChecked = $('#checkbox').prop('checked'); |
|||
|
|||
_service.setSettings({ requireApprovement: isChecked }).done(function (response) { |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response); |
|||
abp.notify.success('CheckBox durumu başarıyla kaydedildi.'); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu güncellenirken bir hata oluştu:', error); |
|||
abp.notify.error('CheckBox durumu kaydedilirken bir hata oluştu.'); |
|||
}); |
|||
}); |
|||
}) |
|||
</script> *@ |
|||
<script> |
|||
var app = app || {}; |
|||
|
|||
app.commentAdmin = (function () { |
|||
var _service = volo.cmsKit.admin.comments.commentAdmin; |
|||
|
|||
var _init = function () { |
|||
_getSettings(); |
|||
_bindEvents(); |
|||
}; |
|||
|
|||
var _getSettings = function () { |
|||
_service.getSettings().done(function (response) { |
|||
var isChecked = response.requireApprovement; |
|||
$('#checkbox').prop('checked', isChecked); |
|||
console.log('CheckBox durumu başarıyla güncellendii:', response.requireApprovement); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu alınırken bir hata oluştu:', error); |
|||
}); |
|||
}; |
|||
|
|||
var _bindEvents = function () { |
|||
$('#save').click(function () { |
|||
var isChecked = $('#checkbox').prop('checked'); |
|||
|
|||
_service.setSettings({ requireApprovement: isChecked }).done(function (response) { |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response); |
|||
abp.notify.success('CheckBox durumu başarıyla kaydedildi.'); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu güncellenirken bir hata oluştu:', error); |
|||
abp.notify.error('CheckBox durumu kaydedilirken bir hata oluştu.'); |
|||
}); |
|||
}); |
|||
}; |
|||
|
|||
return { |
|||
init: _init |
|||
}; |
|||
})(); |
|||
|
|||
$(document).ready(function () { |
|||
app.commentAdmin.init(); |
|||
}); |
|||
|
|||
</script> |
|||
@ -0,0 +1,46 @@ |
|||
|
|||
//$(document).ready(function () {
|
|||
// var service = volo.cmsKit.admin.comments.commentAdmin;
|
|||
// service.getSettings().done(function (response) {
|
|||
// var isChecked = response.requireApprovement
|
|||
// $('#checkbox').prop('checked', isChecked);
|
|||
// console.log('CheckBox durumu başarıyla güncellendi:', response.requireApprovement);
|
|||
// }).fail(function (error) {
|
|||
// console.error('CheckBox durumu alınırken bir hata oluştu:', error);
|
|||
// });
|
|||
|
|||
// $('#save').click(function () {
|
|||
// var isChecked = $('#checkbox').prop('checked');
|
|||
|
|||
// service.setSettings({ RequireApprovement: isChecked }).done(function (response) {
|
|||
// console.log('CheckBox durumu başarıyla güncellendi:', response);
|
|||
// alert('CheckBox durumu başarıyla kaydedildi.');
|
|||
// }).fail(function (error) {
|
|||
// console.error('CheckBox durumu güncellenirken bir hata oluştu:', error);
|
|||
// alert('CheckBox durumu kaydedilirken bir hata oluştu.');
|
|||
// });
|
|||
// });
|
|||
//});
|
|||
var service = volo.cmsKit.admin.comments.commentAdmin; |
|||
|
|||
$(document).ready(function () { |
|||
service.getSettings().done(function (response) { |
|||
var isChecked = response.requireApprovement |
|||
$('#checkbox').prop('checked', isChecked); |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response.requireApprovement); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu alınırken bir hata oluştu:', error); |
|||
}); |
|||
|
|||
$('#save').click(function () { |
|||
var isChecked = $('#checkbox').prop('checked'); |
|||
|
|||
service.setSettings({ RequireApprovement: isChecked }).done(function (response) { |
|||
console.log('CheckBox durumu başarıyla güncellendi:', response); |
|||
alert('CheckBox durumu başarıyla kaydedildi.'); |
|||
}).fail(function (error) { |
|||
console.error('CheckBox durumu güncellenirken bir hata oluştu:', error); |
|||
alert('CheckBox durumu kaydedilirken bir hata oluştu.'); |
|||
}); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,29 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.SettingManagement.Web.Pages.SettingManagement; |
|||
using Volo.CmsKit.Admin.Web.Components.MySettingGroup; |
|||
|
|||
namespace Volo.CmsKit.Admin.Web.Settings; |
|||
|
|||
public class BookStoreSettingPageContributor : ISettingPageContributor |
|||
{ |
|||
public Task ConfigureAsync(SettingPageCreationContext context) |
|||
{ |
|||
context.Groups.Add( |
|||
new SettingPageGroup( |
|||
"Volo.Abp.MySettingGroup", |
|||
"MySettingGroup", |
|||
typeof(CommentSettingViewComponent), |
|||
order: 1 |
|||
) |
|||
); |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
|
|||
public Task<bool> CheckPermissionsAsync(SettingPageCreationContext context) |
|||
{ |
|||
// You can check the permissions here
|
|||
return Task.FromResult(true); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,9 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Volo.CmsKit.Settings; |
|||
public static class AppSettings |
|||
{ |
|||
public const string RequireApprovement = "Comments.RequireApprovement"; |
|||
} |
|||
Loading…
Reference in new issue