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.Collections.cshtml widget-zone selection to per-area partial files (ARCH-001 Phase 2)

KrzysztofPajak5c86aa2ffd20
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Collections.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Collections.cshtml
index 312728347..17b7d376d 100644
--- a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Collections.cshtml
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Collections.cshtml
@@ -5,28 +5,14 @@
@if (!string.IsNullOrEmpty(Model.Id))
{
<div class="panel panel-default">
- @if (Scope.ResourceKeyPrefix == "Vendor")
- {
- <vc:vendor-widget widget-zone="vendor_product_details_collections_top" additional-data="Model"/>
- }
- else
- {
- <vc:admin-widget widget-zone="product_details_collections_top" additional-data="Model"/>
- }
+ <partial name="Partials/WidgetZone.Collections.Top" model="Model"/>
<div class="panel-heading">
@Loc[$"{Scope.ResourceKeyPrefix}.Catalog.Products.Collections.Fields.Collection"]
</div>
<div class="panel-body">
<div id="productcollections-grid"></div>
</div>
- @if (Scope.ResourceKeyPrefix == "Vendor")
- {
- <vc:vendor-widget widget-zone="vendor_product_details_collections_bottom" additional-data="Model"/>
- }
- else
- {
- <vc:admin-widget widget-zone="product_details_collections_bottom" additional-data="Model"/>
- }
+ <partial name="Partials/WidgetZone.Collections.Bottom" model="Model"/>
</div>
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Collections.Bottom.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Collections.Bottom.cshtml
new file mode 100644
index 000000000..2feef39d3
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Collections.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_collections_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Collections.Top.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Collections.Top.cshtml
new file mode 100644
index 000000000..ad2b99fda
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Collections.Top.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_collections_top" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Collections.Bottom.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Collections.Bottom.cshtml
new file mode 100644
index 000000000..650253d90
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Collections.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_collections_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Collections.Top.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Collections.Top.cshtml
new file mode 100644
index 000000000..8b9a94d20
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Collections.Top.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_collections_top" additional-data="Model"/>