Browse Source

Updated component view names

pull/13269/head
malik masis 4 years ago
parent
commit
d4e3794c99
  1. 4
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/ViewComponents/Format.cshtml
  2. 4
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/ViewComponents/FormatViewComponent.cs
  3. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/ViewComponents/Today.cshtml

4
modules/cms-kit/host/Volo.CmsKit.Web.Unified/ViewComponents/Format.cshtml

@ -1,6 +1,6 @@
@using Volo.CmsKit.ViewComponents
@model DecisionCommentDateViewModel
@model FormatViewModel
<div class="form-check mb-3">
<div>
<abp-input asp-for="Format" />
</div>

4
modules/cms-kit/host/Volo.CmsKit.Web.Unified/ViewComponents/FormatViewComponent.cs

@ -19,11 +19,11 @@ public class FormatViewComponent : AbpViewComponent
public virtual async Task<IViewComponentResult> InvokeAsync()
{
return View("~/ViewComponents/Format.cshtml", new DecisionCommentDateViewModel());
return View("~/ViewComponents/Format.cshtml", new FormatViewModel());
}
}
public class DecisionCommentDateViewModel
public class FormatViewModel
{
[DisplayName("Format your date in the component")]
public string Format { get; set; }

2
modules/cms-kit/host/Volo.CmsKit.Web.Unified/ViewComponents/Today.cshtml

@ -2,4 +2,4 @@
<p>Welcome Today Component</p>
<p> @DateTime.Now.ToString(Model.Format)</p>
<p>@DateTime.Now.ToString(Model.Format)</p>

Loading…
Cancel
Save