51 lines
2.6 KiB
Plaintext
51 lines
2.6 KiB
Plaintext
@model BlogSettingsModel
|
|
|
|
@{
|
|
//page title
|
|
ViewBag.PageTitle = T("Admin.Configuration.Settings.Blog").Text;
|
|
//active menu item (system name)
|
|
NopHtml.SetActiveMenuItemSystemName("Blog settings");
|
|
}
|
|
|
|
@{
|
|
const string hideCommonBlockAttributeName = "BlogSettingsPage.HideCommonBlock";
|
|
var customer = await workContext.GetCurrentCustomerAsync();
|
|
var hideCommonBlock = await genericAttributeService.GetAttributeAsync<bool>(customer, hideCommonBlockAttributeName);
|
|
|
|
const string hideCommentsBlockAttributeName = "BlogSettingsPage.HideCommentsBlock";
|
|
var hideCommentsBlock = await genericAttributeService.GetAttributeAsync<bool>(customer, hideCommentsBlockAttributeName);
|
|
}
|
|
|
|
|
|
<form asp-controller="Setting" asp-action="Blog" method="post">
|
|
<div class="content-header clearfix">
|
|
<h1 class="float-left">
|
|
@T("Admin.Configuration.Settings.Blog")
|
|
</h1>
|
|
<div class="float-right">
|
|
<button type="submit" name="save" class="btn btn-primary">
|
|
<i class="far fa-floppy-disk"></i>
|
|
@T("Admin.Common.Save")
|
|
</button>
|
|
@await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.BlogSettingsButtons, additionalData = Model })
|
|
</div>
|
|
</div>
|
|
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="form-horizontal">
|
|
@await Component.InvokeAsync(typeof(StoreScopeConfigurationViewComponent))
|
|
@await Component.InvokeAsync(typeof(SettingModeViewComponent))
|
|
<div asp-validation-summary="All"></div>
|
|
|
|
<nop-cards id="blogsettings-cards">
|
|
<nop-card asp-name="blogsettings-common" asp-icon="fas fa-info" asp-title="@T("Admin.Configuration.Settings.Blog.BlockTitle.Common")" asp-hide-block-attribute-name="@hideCommonBlockAttributeName" asp-hide="@hideCommonBlock" asp-advanced="false">@await Html.PartialAsync("_Blog.Common", Model)</nop-card>
|
|
<nop-card asp-name="blogsettings-comments" asp-icon="far fa-comments" asp-title="@T("Admin.Configuration.Settings.Blog.BlockTitle.BlogComments")" asp-hide-block-attribute-name="@hideCommentsBlockAttributeName" asp-hide="@hideCommentsBlock" asp-advanced="false">@await Html.PartialAsync("_Blog.Comments", Model)</nop-card>
|
|
|
|
@await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.BlogDetailsBlock, additionalData = Model })
|
|
</nop-cards>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|