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.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
refactor(arch001): move shared Category views under Grand.Web.AdminShared/Views/AdminShared/Category
KrzysztofPajakfa46d59c43cb
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabDocuments.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabDocuments.cshtmldeleted file mode 100644index 1f7a78b1b..000000000--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabDocuments.cshtml+++ /dev/null@@ -1,80 +0,0 @@-@model CategoryModel-@inject AdminAreaSettings adminAreaSettings-@if (!string.IsNullOrEmpty(Model.Id))-{- <div class="panel panel-default">- <vc:admin-widget widget-zone="category_details_documents_top" additional-data="Model"/>- <div class="panel-body">- <div id="category-documents-grid"></div>- </div>- <div class="panel-footer">- <button type="button" class="k-button" onclick="location.href='@Url.Action("CreateDocument", "Document", new { ObjectId = Model.Id, Reference = (int)Reference.Category, area = Constants.AreaAdmin })'"><i class="fa fa-plus"></i> @Loc["Admin.Marketing.Document.Add"]</button>- </div>- <vc:admin-widget widget-zone="category_details_documents_bottom" additional-data="Model"/>- </div>-- <script>- $(document).ready(function () {- $("#category-documents-grid").kendoGrid({- dataSource: {- transport: {- read: {- url: "@Html.Raw(Url.Action("ListDocuments", "Document", new { reference = (int)Reference.Category, ObjectId = Model.Id, StatusId = -1, area = Constants.AreaAdmin }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- },- },- schema: {- data: "Data",- total: "Total",- errors: "Errors",- },- error: function(e) {- display_kendoui_grid_error(e);- // Cancel the changes- this.cancelChanges();- },- pageSize: @(adminAreaSettings.DefaultGridPageSize),- serverPaging: true,- serverFiltering: true,- serverSorting: true- },- autoBind: false,- pageable: {- refresh: true,- pageSizes: [@(adminAreaSettings.GridPageSizes)]- },- editable: {- confirmation: true,- mode: "inline"- },- scrollable: false,- columns: [{- field: "Number",- title: "@Loc["Admin.Documents.Document.Fields.Number"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaAdmin })/#=Id#">#=kendo.htmlEncode(Number)#</a>',- },- {- field: "Name",- title: "@Loc["Admin.Documents.Document.Fields.Name"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaAdmin })/#=Id#">#=kendo.htmlEncode(Name)#</a>',- }, {- field: "Published",- title: "@Loc["Admin.Documents.Document.Fields.Published"]",- width: 100,- minScreenWidth: 500,- headerAttributes: { style: "text-align:center" },- attributes: { style: "text-align:center" },- template: '# if(Published) {# <i class="fa fa-check" aria-hidden="true" style="color:green"></i> #} else {# <i class="fa fa-times" aria-hidden="true" style="color:red"></i> #} #'- }]- });- });- </script>-}-else-{- <div class="note note-info">- @Loc["Admin.Catalog.SaveBeforeEdit"]- </div>-}\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabSeo.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabSeo.cshtmldeleted file mode 100644index 6a82eda1b..000000000--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabSeo.cshtml+++ /dev/null@@ -1,77 +0,0 @@-@using Microsoft.AspNetCore.Mvc.Razor-@model CategoryModel--<vc:admin-widget widget-zone="category_details_seo_top" additional-data="Model"/>--@{- Func<int, HelperResult> template = @<div class="form-horizontal">- <div class="form-body">- <div class="form-group">- <admin-label asp-for="@Model.Locales[item].MetaKeywords"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="@Model.Locales[item].MetaKeywords"/>- <span asp-validation-for="@Model.Locales[item].MetaKeywords"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="@Model.Locales[item].MetaDescription"/>- <div class="col-md-9 col-sm-9">- <admin-textarea asp-for="@Model.Locales[item].MetaDescription"></admin-textarea>- <span asp-validation-for="@Model.Locales[item].MetaDescription"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="@Model.Locales[item].MetaTitle"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="@Model.Locales[item].MetaTitle"/>- <span asp-validation-for="@Model.Locales[item].MetaTitle"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="@Model.Locales[item].SeName"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="@Model.Locales[item].SeName"/>- <span asp-validation-for="@Model.Locales[item].SeName"></span>- </div>- </div>- <input type="hidden" asp-for="@Model.Locales[item].LanguageId"/>- </div>- </div>;-}--<localized-editor localized-template="@template" name="category-seo-localized" language-ids="@Model.Locales.Select(c => c.LanguageId).ToList()">- <div class="form-horizontal">- <div class="form-body">- <div class="form-group">- <admin-label asp-for="MetaKeywords"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="MetaKeywords"/>- <span asp-validation-for="MetaKeywords"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="MetaDescription"/>- <div class="col-md-9 col-sm-9">- <admin-textarea asp-for="MetaDescription"></admin-textarea>- <span asp-validation-for="MetaDescription"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="MetaTitle"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="MetaTitle"/>- <span asp-validation-for="MetaTitle"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="SeName"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="SeName"/>- <span asp-validation-for="SeName"></span>- </div>- </div>- </div>- </div>-</localized-editor>--<vc:admin-widget widget-zone="category_details_seo_bottom" additional-data="Model"/>\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.cshtmldeleted file mode 100644index 7b397fed3..000000000--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.cshtml+++ /dev/null@@ -1,61 +0,0 @@-@using Grand.Business.Core.Interfaces.Common.Security-@using Grand.Domain.Permissions-@model CategoryModel-@inject IPermissionService permissionService-@{- //has "Manage Documents" permission?- var canManageDocuments = await permissionService.Authorize(StandardPermission.ManageDocuments);-}-<div asp-validation-summary="All"></div>-<input asp-for="Id" type="hidden"/>--<admin-tabstrip name="category-edit" BindGrid="true">- <items>- <tabstrip-item text="@Loc["Admin.Catalog.Categories.Info"]" tab-index="0">- <content>- <div>- <partial name="Partials/CreateOrUpdate.TabInfo" model="Model"/>- </div>- </content>- </tabstrip-item>- <tabstrip-item text="@Loc["Admin.Common.SEO"]" tab-index="1">- <content>- <div>- <partial name="Partials/CreateOrUpdate.TabSeo" model="Model"/>- </div>- </content>- </tabstrip-item>- <tabstrip-item text="@Loc["Admin.Catalog.Categories.Products"]" tab-index="2">- <content>- <div>- <partial name="Partials/CreateOrUpdate.TabProducts" model="Model"/>- </div>- </content>- </tabstrip-item>- <tabstrip-item text="@Loc["Admin.Catalog.Categories.Discounts"]" tab-index="3">- <content>- <div>- <partial name="Partials/CreateOrUpdate.TabDiscounts" model="Model"/>- </div>- </content>- </tabstrip-item>- @if (canManageDocuments)- {- <tabstrip-item text="@Loc["Admin.Catalog.Categories.Documents"]" tab-index="4">- <content>- <div>- <partial name="Partials/CreateOrUpdate.TabDocuments" model="Model"/>- </div>- </content>- </tabstrip-item>- }- <tabstrip-item text="@Loc["Admin.Common.UserFields.Tab"]" tab-index="5">- <content>- <div>- <partial name="Partials/UserFields" model="Model"/>- </div>- </content>- </tabstrip-item>- <vc:admin-widget widget-zone="category_details_tabs" additional-data="Model"/>- </items>-</admin-tabstrip>\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.DetailsButtons.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.DetailsButtons.cshtmlnew file mode 100644index 000000000..b55f963c6--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.DetailsButtons.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_buttons" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Discounts.Bottom.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Discounts.Bottom.cshtmlnew file mode 100644index 000000000..7204fcb9f--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Discounts.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_discounts_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Discounts.Top.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Discounts.Top.cshtmlnew file mode 100644index 000000000..244ac26fd--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Discounts.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_discounts_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Documents.Bottom.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Documents.Bottom.cshtmlnew file mode 100644index 000000000..c3b270d27--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Documents.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_documents_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Documents.Top.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Documents.Top.cshtmlnew file mode 100644index 000000000..9ddcdbb44--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Documents.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_documents_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Products.Bottom.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Products.Bottom.cshtmlnew file mode 100644index 000000000..608780f95--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Products.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_products_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Products.Top.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Products.Top.cshtmlnew file mode 100644index 000000000..f2d42e06e--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Products.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_products_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.SEO.Bottom.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.SEO.Bottom.cshtmlnew file mode 100644index 000000000..564e0e859--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.SEO.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_seo_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.SEO.Top.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.SEO.Top.cshtmlnew file mode 100644index 000000000..850b2162d--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.SEO.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_seo_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Tabs.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Tabs.cshtmlnew file mode 100644index 000000000..463a9990d--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/WidgetZone.Tabs.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:admin-widget widget-zone="category_details_tabs" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Create.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Create.cshtmlsimilarity index 84%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Create.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Create.cshtmlindex 3a15acc5f..03847cabb 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Create.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Create.cshtml@@ -1,9 +1,10 @@-@model CategoryModel+@model CategoryModel@{//page titleViewBag.Title = Loc["Admin.Catalog.Categories.AddNew"];+ var area = ViewContext.RouteData.Values["area"]?.ToString();}-<form asp-area="@Constants.AreaAdmin" asp-controller="Category" asp-action="Create" method="post" id="category-form">+<form asp-area="@area" asp-controller="Category" asp-action="Create" method="post" id="category-form"><div class="row"><div class="col-md-12">@@ -27,11 +28,11 @@</div></div></div>- <vc:admin-widget widget-zone="category_details_buttons" additional-data="null"/>+ <partial name="Partials/WidgetZone.DetailsButtons"/><div class="x_content form"><partial name="Partials/CreateOrUpdate" model="Model"/></div></div></div></div>-</form>\ No newline at end of file+</form>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Edit.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Edit.cshtmlsimilarity index 86%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Edit.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Edit.cshtmlindex 5a3ac9167..3aa5a50cb 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Edit.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Edit.cshtml@@ -1,9 +1,10 @@-@model CategoryModel+@model CategoryModel@{//page titleViewBag.Title = Loc["Admin.Catalog.Categories.EditCategoryDetails"];+ var area = ViewContext.RouteData.Values["area"]?.ToString();}-<form asp-area="@Constants.AreaAdmin" asp-controller="Category" asp-action="Edit" method="post" id="category-form">+<form asp-area="@area" asp-controller="Category" asp-action="Edit" method="post" id="category-form"><div class="row"><div class="col-md-12">@@ -34,7 +35,7 @@</div></div></div>- <vc:admin-widget widget-zone="category_details_buttons" additional-data="Model"/>+ <partial name="Partials/WidgetZone.DetailsButtons" model="Model"/><div class="x_content form"><partial name="Partials/CreateOrUpdate" model="Model"/></div>@@ -42,4 +43,4 @@</div></div></form>-<admin-delete-confirmation button-id="category-delete"/>\ No newline at end of file+<admin-delete-confirmation button-id="category-delete"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabDiscounts.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabDiscounts.cshtmlsimilarity index 79%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabDiscounts.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabDiscounts.cshtmlindex 26bfeff75..4d67ed60a 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabDiscounts.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabDiscounts.cshtml@@ -1,5 +1,5 @@-@model CategoryModel-<vc:admin-widget widget-zone="category_details_discounts_top" additional-data="Model"/>+@model CategoryModel+<partial name="Partials/WidgetZone.Discounts.Top" model="Model"/>@if (Model.AvailableDiscounts is { Count: > 0 }){<div class="mt-checkbox-list">@@ -22,4 +22,4 @@ else@Html.Raw(Loc["Admin.Catalog.Categories.Discounts.NoDiscounts"])</div>}-<vc:admin-widget widget-zone="category_details_discounts_bottom" additional-data="Model"/>\ No newline at end of file+<partial name="Partials/WidgetZone.Discounts.Bottom" model="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabDocuments.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabDocuments.cshtmlsimilarity index 81%rename from src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabDocuments.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabDocuments.cshtmlindex 9c0d13167..dc38ca98d 100644--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabDocuments.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabDocuments.cshtml@@ -1,16 +1,19 @@-@model CategoryModel+@model CategoryModel@inject AdminAreaSettings adminAreaSettings+@{+ var area = ViewContext.RouteData.Values["area"]?.ToString();+}@if (!string.IsNullOrEmpty(Model.Id)){<div class="panel panel-default">- <vc:admin-widget widget-zone="category_details_documents_top" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Documents.Top" model="Model"/><div class="panel-body"><div id="category-documents-grid"></div></div><div class="panel-footer">- <button type="button" class="k-button" onclick="location.href='@Url.Action("CreateDocument", "Document", new { ObjectId = Model.Id, Reference = (int)Reference.Category, area = Constants.AreaStore })'"><i class="fa fa-plus"></i> @Loc["Admin.Marketing.Document.Add"]</button>+ <button type="button" class="k-button" onclick="location.href='@Url.Action("CreateDocument", "Document", new { ObjectId = Model.Id, Reference = (int)Reference.Category, area = area })'"><i class="fa fa-plus"></i> @Loc["Admin.Marketing.Document.Add"]</button></div>- <vc:admin-widget widget-zone="category_details_documents_bottom" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Documents.Bottom" model="Model"/></div><script>@@ -19,7 +22,7 @@dataSource: {transport: {read: {- url: "@Html.Raw(Url.Action("ListDocuments", "Document", new { reference = (int)Reference.Category, ObjectId = Model.Id, StatusId = -1, area = Constants.AreaStore }))",+ url: "@Html.Raw(Url.Action("ListDocuments", "Document", new { reference = (int)Reference.Category, ObjectId = Model.Id, StatusId = -1, area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken@@ -53,12 +56,12 @@columns: [{field: "Number",title: "@Loc["Admin.Documents.Document.Fields.Number"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaStore })/#=Id#">#=kendo.htmlEncode(Number)#</a>',+ template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = area })/#=Id#">#=kendo.htmlEncode(Number)#</a>',},{field: "Name",title: "@Loc["Admin.Documents.Document.Fields.Name"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaStore })/#=Id#">#=kendo.htmlEncode(Name)#</a>',+ template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = area })/#=Id#">#=kendo.htmlEncode(Name)#</a>',}, {field: "Published",title: "@Loc["Admin.Documents.Document.Fields.Published"]",@@ -77,4 +80,4 @@ else<div class="note note-info">@Loc["Admin.Catalog.SaveBeforeEdit"]</div>-}\ No newline at end of file+}diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabProducts.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabProducts.cshtmlsimilarity index 89%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabProducts.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabProducts.cshtmlindex 3cf1ab97b..a162425e2 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Category/Partials/CreateOrUpdate.TabProducts.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabProducts.cshtml@@ -1,6 +1,9 @@-@model CategoryModel+@model CategoryModel@inject AdminAreaSettings adminAreaSettings-<vc:admin-widget widget-zone="category_details_products_top" additional-data="Model"/>+@{+ var area = ViewContext.RouteData.Values["area"]?.ToString();+}+<partial name="Partials/WidgetZone.Products.Top" model="Model"/>@if (!string.IsNullOrEmpty(Model.Id)){<div class="panel panel-default">@@ -8,7 +11,7 @@<div id="products-grid"></div></div><div class="panel-footer">- <a id="btnAddNewProduct" href="@(Url.Action("ProductAddPopup", "Category", new { categoryId = Model.Id, btnId = "btnRefreshProducts", formId = "category-form", area = Constants.AreaAdmin }))" class="k-button"><i class="fa fa-plus"></i> @Loc["Admin.Catalog.Categories.Products.AddNew"]</a>+ <a id="btnAddNewProduct" href="@(Url.Action("ProductAddPopup", "Category", new { categoryId = Model.Id, btnId = "btnRefreshProducts", formId = "category-form", area = area }))" class="k-button"><i class="fa fa-plus"></i> @Loc["Admin.Catalog.Categories.Products.AddNew"]</a><input type="submit" id="btnRefreshProducts" style="display: none"/></div></div>@@ -31,19 +34,19 @@dataSource: {transport: {read: {- url: "@Html.Raw(Url.Action("ProductList", "Category", new { categoryId = Model.Id, area = Constants.AreaAdmin }))",+ url: "@Html.Raw(Url.Action("ProductList", "Category", new { categoryId = Model.Id, area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken},update: {- url:"@Html.Raw(Url.Action("ProductUpdate", "Category", new { area = Constants.AreaAdmin }))",+ url:"@Html.Raw(Url.Action("ProductUpdate", "Category", new { area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken},destroy: {- url: "@Html.Raw(Url.Action("ProductDelete", "Category", new { area = Constants.AreaAdmin }))",+ url: "@Html.Raw(Url.Action("ProductDelete", "Category", new { area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken@@ -91,7 +94,7 @@columns: [{field: "ProductName",title: "@Loc["Admin.Catalog.Categories.Products.Fields.Product"]",- template: '<a class="k-link" href="@Url.Action("Edit", "Product", new { area = Constants.AreaAdmin })/#=ProductId#">#=kendo.htmlEncode(ProductName)#</a>',+ template: '<a class="k-link" href="@Url.Action("Edit", "Product", new { area = area })/#=ProductId#">#=kendo.htmlEncode(ProductName)#</a>',}, {field: "IsFeaturedProduct",title: "@Loc["Admin.Catalog.Categories.Products.Fields.IsFeaturedProduct"]",@@ -143,4 +146,4 @@ else@Loc["Admin.Catalog.Categories.Products.SaveBeforeEdit"]</div>}-<vc:admin-widget widget-zone="category_details_products_bottom" additional-data="Model"/>\ No newline at end of file+<partial name="Partials/WidgetZone.Products.Bottom" model="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabSeo.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabSeo.cshtmlsimilarity index 95%rename from src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabSeo.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabSeo.cshtmlindex 6a82eda1b..e54e9dad4 100644--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabSeo.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.TabSeo.cshtml@@ -1,7 +1,7 @@-@using Microsoft.AspNetCore.Mvc.Razor+@using Microsoft.AspNetCore.Mvc.Razor@model CategoryModel-<vc:admin-widget widget-zone="category_details_seo_top" additional-data="Model"/>+<partial name="Partials/WidgetZone.SEO.Top" model="Model"/>@{Func<int, HelperResult> template = @<div class="form-horizontal">@@ -74,4 +74,4 @@</div></localized-editor>-<vc:admin-widget widget-zone="category_details_seo_bottom" additional-data="Model"/>\ No newline at end of file+<partial name="Partials/WidgetZone.SEO.Bottom" model="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.cshtmlsimilarity index 93%rename from src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.cshtmlindex 7b397fed3..cccce9c25 100644--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Category/Partials/CreateOrUpdate.cshtml@@ -1,4 +1,4 @@-@using Grand.Business.Core.Interfaces.Common.Security+@using Grand.Business.Core.Interfaces.Common.Security@using Grand.Domain.Permissions@model CategoryModel@inject IPermissionService permissionService@@ -56,6 +56,6 @@</div></content></tabstrip-item>- <vc:admin-widget widget-zone="category_details_tabs" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Tabs" model="Model"/></items>-</admin-tabstrip>\ No newline at end of file+</admin-tabstrip>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Create.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Create.cshtmldeleted file mode 100644index 3cbca3ecc..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Create.cshtml+++ /dev/null@@ -1,37 +0,0 @@-@model CategoryModel-@{- //page title- ViewBag.Title = Loc["Admin.Catalog.Categories.AddNew"];-}-<form asp-area="@Constants.AreaStore" asp-controller="Category" asp-action="Create" method="post" id="category-form">-- <div class="row">- <div class="col-md-12">- <div class="x_panel light form-fit">- <div class="x_title">- <div class="caption">- <i class="fa fa-sitemap"></i>- @Loc["Admin.Catalog.Categories.AddNew"]- <small>- <i class="fa fa-arrow-circle-left"></i>@Html.ActionLink(Loc["Admin.Catalog.Categories.BackToList"], "List")- </small>- </div>- <div class="actions">- <div class="btn-group btn-group-devided util-btn-margin-bottom-5">- <button class="btn btn-success" type="submit" name="save">- <i class="fa fa-check"></i> @Loc["Admin.Common.Save"]- </button>- <button class="btn btn-success" type="submit" name="save-continue">- <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"]- </button>- </div>- </div>- </div>- <vc:admin-widget widget-zone="category_details_buttons" additional-data="null"/>- <div class="x_content form">- <partial name="Partials/CreateOrUpdate" model="Model"/>- </div>- </div>- </div>- </div>-</form>\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Edit.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Edit.cshtmldeleted file mode 100644index c7965d881..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Edit.cshtml+++ /dev/null@@ -1,45 +0,0 @@-@model CategoryModel-@{- //page title- ViewBag.Title = Loc["Admin.Catalog.Categories.EditCategoryDetails"];-}-<form asp-area="@Constants.AreaStore" asp-controller="Category" asp-action="Edit" method="post" id="category-form">-- <div class="row">- <div class="col-md-12">- <div class="x_panel light form-fit">- <div class="x_title">- <div class="caption">- <i class="fa fa-sitemap"></i>- @Loc["Admin.Catalog.Categories.EditCategoryDetails"] - @Model.Name- <small>- <i class="fa fa-arrow-circle-left"></i>@Html.ActionLink(Loc["Admin.Catalog.Categories.BackToList"], "List")- </small>- </div>- <div class="actions">- <div class="btn-group btn-group-devided util-btn-margin-bottom-5">- <button type="button" onclick="window.open('@Url.RouteUrl("Category", new { Model.SeName })','_blank');" class="btn purple">- <i class="fa fa-eye"></i>- @Loc["Admin.Common.Preview"]- </button>- <button class="btn btn-success" type="submit" name="save">- <i class="fa fa-check"></i> @Loc["Admin.Common.Save"]- </button>- <button class="btn btn-success" type="submit" name="save-continue">- <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"]- </button>- <span id="category-delete" class="btn red">- <i class="fa fa-trash-o"></i> @Loc["Admin.Common.Delete"]- </span>- </div>- </div>- </div>- <vc:admin-widget widget-zone="category_details_buttons" additional-data="Model"/>- <div class="x_content form">- <partial name="Partials/CreateOrUpdate" model="Model"/>- </div>- </div>- </div>- </div>-</form>-<admin-delete-confirmation button-id="category-delete"/>\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabDiscounts.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabDiscounts.cshtmldeleted file mode 100644index 26bfeff75..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabDiscounts.cshtml+++ /dev/null@@ -1,25 +0,0 @@-@model CategoryModel-<vc:admin-widget widget-zone="category_details_discounts_top" additional-data="Model"/>-@if (Model.AvailableDiscounts is { Count: > 0 })-{- <div class="mt-checkbox-list">- @foreach (var discount in Model.AvailableDiscounts)- {- <label class="mt-checkbox mt-checkbox-outline control control-checkbox">- <input type="checkbox" name="SelectedDiscountIds" value="@discount.Id"- @if (Model.SelectedDiscountIds != null && Model.SelectedDiscountIds.Contains(discount.Id))- {- <text> checked="checked" </text>- }/>@discount.Name- <div class="control__indicator"></div>- </label>- }- </div>-}-else-{- <div class="note note-info">- @Html.Raw(Loc["Admin.Catalog.Categories.Discounts.NoDiscounts"])- </div>-}-<vc:admin-widget widget-zone="category_details_discounts_bottom" additional-data="Model"/>\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabProducts.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabProducts.cshtmldeleted file mode 100644index ead773130..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/CreateOrUpdate.TabProducts.cshtml+++ /dev/null@@ -1,146 +0,0 @@-@model CategoryModel-@inject AdminAreaSettings adminAreaSettings-<vc:admin-widget widget-zone="category_details_products_top" additional-data="Model"/>-@if (!string.IsNullOrEmpty(Model.Id))-{- <div class="panel panel-default">- <div class="panel-body">- <div id="products-grid"></div>- </div>- <div class="panel-footer">- <a id="btnAddNewProduct" href="@(Url.Action("ProductAddPopup", "Category", new { categoryId = Model.Id, btnId = "btnRefreshProducts", formId = "category-form", area = Constants.AreaStore }))" class="k-button"><i class="fa fa-plus"></i> @Loc["Admin.Catalog.Categories.Products.AddNew"]</a>- <input type="submit" id="btnRefreshProducts" style="display: none"/>- </div>- </div>- <script>- $(document).ready(function () {- $('#btnAddNewProduct').magnificPopup({- type: 'ajax',- settings: { cache: false, async: false },- midClick: true,- callbacks: {- parseAjax: function (mfpResponse) {- mfpResponse.data = $('<div></div>').html(mfpResponse.data);- },- ajaxContentAdded: function () {- $('.mfp-wrap').removeAttr('tabindex');- }- }- });- $("#products-grid").kendoGrid({- dataSource: {- transport: {- read: {- url: "@Html.Raw(Url.Action("ProductList", "Category", new { categoryId = Model.Id, area = Constants.AreaStore }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- },- update: {- url:"@Html.Raw(Url.Action("ProductUpdate", "Category", new { area = Constants.AreaStore }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- },- destroy: {- url: "@Html.Raw(Url.Action("ProductDelete", "Category", new { area = Constants.AreaStore }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- }- },- schema: {- data: "Data",- total: "Total",- errors: "Errors",- model: {- id: "Id",- fields: {- ProductName: {editable: false, type: "string" },- IsFeaturedProduct: {editable: true, type: "boolean" },- DisplayOrder: {editable: true, type: "number" },- ProductId: {editable: false, type: "string" }- }- }- },- requestEnd: function(e) {- if(e.type=="update") {- this.read();- }- },- error: function(e) {- display_kendoui_grid_error(e);- // Cancel the changes- this.cancelChanges();- },- pageSize: @(adminAreaSettings.DefaultGridPageSize),- serverPaging: true,- serverFiltering: true,- serverSorting: true- },- autoBind: false,- pageable: {- refresh: true,- pageSizes: [@(adminAreaSettings.GridPageSizes)]- },- editable: {- confirmation: false,- mode: "inline"- },- scrollable: false,- columns: [{- field: "ProductName",- title: "@Loc["Admin.Catalog.Categories.Products.Fields.Product"]",- template: '<a class="k-link" href="@Url.Action("Edit", "Product", new { area = Constants.AreaStore })/#=ProductId#">#=kendo.htmlEncode(ProductName)#</a>',- }, {- field: "IsFeaturedProduct",- title: "@Loc["Admin.Catalog.Categories.Products.Fields.IsFeaturedProduct"]",- headerAttributes: { style: "text-align:center" },- attributes: { style: "text-align:center" },- minScreenWidth: 750,- width: 175,- template: '# if(IsFeaturedProduct) {# <i class="fa fa-check" aria-hidden="true" style="color:green"></i> #} else {# <i class="fa fa-times" aria-hidden="true" style="color:red"></i> #} #'- }, {- field: "DisplayOrder",- width: 125,- headerAttributes: { style: "text-align:center" },- attributes: { style: "text-align:center" },- minScreenWidth: 750,- title: "@Loc["Admin.Catalog.Categories.Products.Fields.DisplayOrder"]",- format: "{0:0}",- }, {- command: [{- name: "edit",- text: {- edit: "@Loc["Admin.Common.Edit"]",- update: "@Loc["Admin.Common.Update"]",- cancel: "@Loc["Admin.Common.Cancel"]"- }- }, {- name: "destroy",- text: "@Loc["Admin.Common.Delete"]"- }],- }]- });- });- </script>- <script>- $(document).ready(function () {- $('#btnRefreshProducts').click(function () {- //refresh grid- var grid = $("#products-grid").data('kendoGrid');- grid.dataSource.read();-- //return false to don't reload a page- return false;- });- });- </script>-}-else-{- <div class="note note-info">- @Loc["Admin.Catalog.Categories.Products.SaveBeforeEdit"]- </div>-}-<vc:admin-widget widget-zone="category_details_products_bottom" additional-data="Model"/>\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.DetailsButtons.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.DetailsButtons.cshtmlnew file mode 100644index 000000000..ea0c11c16--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.DetailsButtons.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_buttons" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Discounts.Bottom.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Discounts.Bottom.cshtmlnew file mode 100644index 000000000..9f4d46fd4--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Discounts.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_discounts_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Discounts.Top.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Discounts.Top.cshtmlnew file mode 100644index 000000000..4bdc29fec--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Discounts.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_discounts_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Documents.Bottom.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Documents.Bottom.cshtmlnew file mode 100644index 000000000..f8bf8bcf6--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Documents.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_documents_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Documents.Top.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Documents.Top.cshtmlnew file mode 100644index 000000000..2ec4d8f3f--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Documents.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_documents_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Products.Bottom.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Products.Bottom.cshtmlnew file mode 100644index 000000000..efd2eb8fa--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Products.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_products_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Products.Top.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Products.Top.cshtmlnew file mode 100644index 000000000..55ad78c64--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Products.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_products_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.SEO.Bottom.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.SEO.Bottom.cshtmlnew file mode 100644index 000000000..1cda494f1--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.SEO.Bottom.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_seo_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.SEO.Top.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.SEO.Top.cshtmlnew file mode 100644index 000000000..1ed2c1997--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.SEO.Top.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_seo_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Tabs.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Tabs.cshtmlnew file mode 100644index 000000000..307a7fb11--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Category/Partials/WidgetZone.Tabs.cshtml@@ -0,0 +1,2 @@+@model CategoryModel+<vc:store-widget widget-zone="store_category_details_tabs" additional-data="Model"/>