Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1.4 KB
Raw Blame
@using Microsoft.AspNetCore.Mvc.Razor
@model KnowledgebaseArticleModel

@Html.ValidationSummary(true)
<input asp-for="Id" type="hidden"/>

@{
    Func<int, HelperResult>
        template = @<div class="grand-fields">
            <admin-field asp-for="@Model.Locales[item].Name"/>
            <admin-field asp-for="@Model.Locales[item].Content" asp-template="Editor"/>
            <input type="hidden" asp-for="@Model.Locales[item].LanguageId"/>
        </div>;
}
@* Two cards instead of one column of 3/9 rows: what the article says, then where it sits and who
   sees it. *@
<admin-card>
    <localized-editor localized-template="@template" name="knowledbasearticle-info-localized" language-ids="@Model.Locales.Select(c => c.LanguageId).ToList()">
        <div class="grand-fields">
            <admin-field asp-for="Name"/>
            <admin-field asp-for="Content" asp-template="Editor"/>
        </div>
    </localized-editor>
</admin-card>
<admin-card>
    <div class="grand-fields grand-fields--2col">
        <admin-field asp-for="ParentCategoryId" asp-items="Model.Categories"/>
        <admin-field asp-for="DisplayOrder" size="sm"/>
        <admin-field asp-for="Published"/>
        <admin-field asp-for="AllowComments"/>
        <admin-field asp-for="ShowOnHomepage"/>
        <admin-field asp-for="CustomerGroups"/>
        <admin-field asp-for="Stores"/>
    </div>
</admin-card>