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.

Retrofit CreateOrUpdate.Inventory.cshtml widget-zone selection to per-area partial files (ARCH-001 Phase 2)

KrzysztofPajakecfa5e333e62
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Inventory.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Inventory.cshtml
index e413c6719..a637cc14f 100644
--- a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Inventory.cshtml
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Inventory.cshtml
@@ -1,12 +1,5 @@
@model ProductModel
-@if (Scope.ResourceKeyPrefix == "Vendor")
-{
- <vc:vendor-widget widget-zone="vendor_product_details_inventory_top" additional-data="Model"/>
-}
-else
-{
- <vc:admin-widget widget-zone="product_details_inventory_top" additional-data="Model"/>
-}
+<partial name="Partials/WidgetZone.Inventory.Top" model="Model"/>
<div class="form-horizontal portlet bg-inverse form-fit" id="group-inventory">
<div class="form-body">
<div class="form-group">
@@ -282,11 +275,4 @@ else
</div>
</div>
</div>
-@if (Scope.ResourceKeyPrefix == "Vendor")
-{
- <vc:vendor-widget widget-zone="vendor_product_details_inventory_bottom" additional-data="Model"/>
-}
-else
-{
- <vc:admin-widget widget-zone="product_details_inventory_bottom" additional-data="Model"/>
-}
\ No newline at end of file
+<partial name="Partials/WidgetZone.Inventory.Bottom" model="Model"/>
\ No newline at end of file
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Inventory.Bottom.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Inventory.Bottom.cshtml
new file mode 100644
index 000000000..94f1a73ec
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Inventory.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_inventory_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Inventory.Top.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Inventory.Top.cshtml
new file mode 100644
index 000000000..3b6542cd1
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Inventory.Top.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_inventory_top" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Inventory.Bottom.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Inventory.Bottom.cshtml
new file mode 100644
index 000000000..4ba492dab
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Inventory.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_inventory_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Inventory.Top.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Inventory.Top.cshtml
new file mode 100644
index 000000000..ac3addd2e
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Inventory.Top.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_inventory_top" additional-data="Model"/>