Browse Source

code review was done

pull/19919/head
Emre 2 years ago
parent
commit
6cd98c66d8
  1. 8
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Details.cshtml
  2. 8
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml
  3. 10
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json
  4. 2
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs

8
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Details.cshtml

@ -98,10 +98,10 @@
<div class="mb-3" id="IsApprovedSelectInput"> <div class="mb-3" id="IsApprovedSelectInput">
<label class="mb-1" for="IsApprovedSelect">@L["CommentFilter:ApproveState"].Value</label> <label class="mb-1" for="IsApprovedSelect">@L["CommentFilter:ApproveState"].Value</label>
<select id="IsApprovedSelect" asp-for="@Model.CommentApproveState" class="form-control"> <select id="IsApprovedSelect" asp-for="@Model.CommentApproveState" class="form-control">
<option value="@CommentApproveState.All">@L["CommentFilter:All"].Value</option> @foreach (var status in (CommentApproveState[])Enum.GetValues(typeof(CommentApproveState)))
<option value="@CommentApproveState.Approved">@L["CommentFilter:Approved"].Value</option> {
<option value="@CommentApproveState.Disapproved">@L["CommentFilter:Disapproved"].Value</option> <option value="@((int)status)">@L["CommentFilter:" + (int)status]</option>
<option value="@CommentApproveState.Waiting">@L["CommentFilter:Waiting"].Value</option> }
</select> </select>
</div> </div>
</abp-column> </abp-column>

8
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml

@ -63,10 +63,10 @@
<div class="mb-3" id="IsApprovedSelectInput"> <div class="mb-3" id="IsApprovedSelectInput">
<label class="mb-1" for="IsApprovedSelect">@L["CommentFilter:ApproveState"].Value</label> <label class="mb-1" for="IsApprovedSelect">@L["CommentFilter:ApproveState"].Value</label>
<select id="IsApprovedSelect" asp-for="@Model.CommentApproveState" class="form-control"> <select id="IsApprovedSelect" asp-for="@Model.CommentApproveState" class="form-control">
<option value="@CommentApproveState.All">@L["CommentFilter:All"].Value</option> @foreach (var status in (CommentApproveState[])Enum.GetValues(typeof(CommentApproveState)))
<option value="@CommentApproveState.Approved">@L["CommentFilter:Approved"].Value</option> {
<option value="@CommentApproveState.Disapproved">@L["CommentFilter:Disapproved"].Value</option> <option value="@((int)status)">@L["CommentFilter:" + (int)status]</option>
<option value="@CommentApproveState.Waiting">@L["CommentFilter:Waiting"].Value</option> }
</select> </select>
</div> </div>
</abp-column> </abp-column>

10
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json

@ -233,15 +233,15 @@
"CmsKitCommentOptions:RequireApprovement": "Require approval for comments", "CmsKitCommentOptions:RequireApprovement": "Require approval for comments",
"CmsKitCommentOptions:RequireApprovementDescription": "When enabled, comments will require approval before being published.", "CmsKitCommentOptions:RequireApprovementDescription": "When enabled, comments will require approval before being published.",
"CommentFilter:ApproveState":"Approve State", "CommentFilter:ApproveState":"Approve State",
"CommentFilter:All":"All", "CommentFilter:0":"All",
"CommentFilter:Approved":"Approved", "CommentFilter:1":"Approved",
"CommentFilter:Disapproved":"Disapproved", "CommentFilter:2":"Disapproved",
"CommentFilter:Waiting":"Waiting", "CommentFilter:4":"Waiting",
"ApprovedSuccessfully":"Approved Successfully", "ApprovedSuccessfully":"Approved Successfully",
"ApprovalRevokedSuccessfully":"Approval Revoked Successfully", "ApprovalRevokedSuccessfully":"Approval Revoked Successfully",
"Approve":"Approve", "Approve":"Approve",
"Disapproved":"Disapproved", "Disapproved":"Disapproved",
"CommentAlertMessage":"There are {0} comments waiting for approval", "CommentAlertMessage":"There are {0} comments waiting for approval",
"Menu:CmsKitCommentOptions":"CmsKit Comment Options" "Settings:Menu:CmsKit":"CmsKit Comment Options"
} }
} }

2
modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs

@ -12,12 +12,10 @@ public class CommentAdminAppService_Tests : CmsKitApplicationTestBase
{ {
private readonly ICommentAdminAppService _commentAdminAppService; private readonly ICommentAdminAppService _commentAdminAppService;
private readonly CmsKitTestData _cmsKitTestData; private readonly CmsKitTestData _cmsKitTestData;
private readonly ISettingManager _settingManager;
public CommentAdminAppService_Tests() public CommentAdminAppService_Tests()
{ {
_commentAdminAppService = GetRequiredService<ICommentAdminAppService>(); _commentAdminAppService = GetRequiredService<ICommentAdminAppService>();
_cmsKitTestData = GetRequiredService<CmsKitTestData>(); _cmsKitTestData = GetRequiredService<CmsKitTestData>();
_settingManager = GetRequiredService<ISettingManager>();
} }
[Fact] [Fact]

Loading…
Cancel
Save