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

KrzysztofPajak27bbd4f4bca7
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.BundleProducts.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.BundleProducts.cshtml
index c2f1f6ef2..be87bd345 100644
--- a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.BundleProducts.cshtml
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.BundleProducts.cshtml
@@ -6,14 +6,7 @@
@if (!string.IsNullOrEmpty(Model.Id))
{
<div class="panel panel-default">
- @if (Scope.ResourceKeyPrefix == "Vendor")
- {
- <vc:vendor-widget widget-zone="vendor_product_details_bundle_products_top" additional-data="Model"/>
- }
- else
- {
- <vc:admin-widget widget-zone="product_details_bundle_products_top" additional-data="Model"/>
- }
+ <partial name="Partials/WidgetZone.BundleProducts.Top" model="Model"/>
<div class="panel-body">
<div id="bundleproducts-grid"></div>
</div>
@@ -23,14 +16,7 @@
</a>
<input type="submit" id="btnRefreshBundleProducts" style="display: none"/>
</div>
- @if (Scope.ResourceKeyPrefix == "Vendor")
- {
- <vc:vendor-widget widget-zone="vendor_product_details_bundle_products_bottom" additional-data="Model"/>
- }
- else
- {
- <vc:admin-widget widget-zone="product_details_bundle_products_bottom" additional-data="Model"/>
- }
+ <partial name="Partials/WidgetZone.BundleProducts.Bottom" model="Model"/>
</div>
<script>
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.BundleProducts.Bottom.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.BundleProducts.Bottom.cshtml
new file mode 100644
index 000000000..6393243e7
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.BundleProducts.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_bundle_products_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.BundleProducts.Top.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.BundleProducts.Top.cshtml
new file mode 100644
index 000000000..cd795bb68
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.BundleProducts.Top.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_bundle_products_top" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.BundleProducts.Bottom.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.BundleProducts.Bottom.cshtml
new file mode 100644
index 000000000..688b877d0
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.BundleProducts.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_bundle_products_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.BundleProducts.Top.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.BundleProducts.Top.cshtml
new file mode 100644
index 000000000..b077ea59e
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.BundleProducts.Top.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_bundle_products_top" additional-data="Model"/>