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">
<label class="mb-1" for="IsApprovedSelect">@L["CommentFilter:ApproveState"].Value</label>
<select id="IsApprovedSelect" asp-for="@Model.CommentApproveState" class="form-control">
<option value="@CommentApproveState.All">@L["CommentFilter:All"].Value</option>
<option value="@CommentApproveState.Approved">@L["CommentFilter:Approved"].Value</option>
<option value="@CommentApproveState.Disapproved">@L["CommentFilter:Disapproved"].Value</option>
<option value="@CommentApproveState.Waiting">@L["CommentFilter:Waiting"].Value</option>
@foreach (var status in (CommentApproveState[])Enum.GetValues(typeof(CommentApproveState)))
{
<option value="@((int)status)">@L["CommentFilter:" + (int)status]</option>
}
</select>
</div>
</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">
<label class="mb-1" for="IsApprovedSelect">@L["CommentFilter:ApproveState"].Value</label>
<select id="IsApprovedSelect" asp-for="@Model.CommentApproveState" class="form-control">
<option value="@CommentApproveState.All">@L["CommentFilter:All"].Value</option>
<option value="@CommentApproveState.Approved">@L["CommentFilter:Approved"].Value</option>
<option value="@CommentApproveState.Disapproved">@L["CommentFilter:Disapproved"].Value</option>
<option value="@CommentApproveState.Waiting">@L["CommentFilter:Waiting"].Value</option>
@foreach (var status in (CommentApproveState[])Enum.GetValues(typeof(CommentApproveState)))
{
<option value="@((int)status)">@L["CommentFilter:" + (int)status]</option>
}
</select>
</div>
</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:RequireApprovementDescription": "When enabled, comments will require approval before being published.",
"CommentFilter:ApproveState":"Approve State",
"CommentFilter:All":"All",
"CommentFilter:Approved":"Approved",
"CommentFilter:Disapproved":"Disapproved",
"CommentFilter:Waiting":"Waiting",
"CommentFilter:0":"All",
"CommentFilter:1":"Approved",
"CommentFilter:2":"Disapproved",
"CommentFilter:4":"Waiting",
"ApprovedSuccessfully":"Approved Successfully",
"ApprovalRevokedSuccessfully":"Approval Revoked Successfully",
"Approve":"Approve",
"Disapproved":"Disapproved",
"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 CmsKitTestData _cmsKitTestData;
private readonly ISettingManager _settingManager;
public CommentAdminAppService_Tests()
{
_commentAdminAppService = GetRequiredService<ICommentAdminAppService>();
_cmsKitTestData = GetRequiredService<CmsKitTestData>();
_settingManager = GetRequiredService<ISettingManager>();
}
[Fact]

Loading…
Cancel
Save