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

KrzysztofPajak1aa394b6bb71
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Pictures.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Pictures.cshtml
index 30f1e492d..7335ec3e5 100644
--- a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Pictures.cshtml
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Pictures.cshtml
@@ -5,25 +5,11 @@
@if (!string.IsNullOrEmpty(Model.Id))
{
<div class="panel panel-default">
- @if (Scope.ResourceKeyPrefix == "Vendor")
- {
- <vc:vendor-widget widget-zone="vendor_product_details_pictures_top" additional-data="Model"/>
- }
- else
- {
- <vc:admin-widget widget-zone="product_details_pictures_top" additional-data="Model"/>
- }
+ <partial name="Partials/WidgetZone.Pictures.Top" model="Model"/>
<div class="panel-body">
<div id="productpictures-grid"></div>
</div>
- @if (Scope.ResourceKeyPrefix == "Vendor")
- {
- <vc:vendor-widget widget-zone="vendor_product_details_pictures_bottom" additional-data="Model"/>
- }
- else
- {
- <vc:admin-widget widget-zone="product_details_pictures_bottom" additional-data="Model"/>
- }
+ <partial name="Partials/WidgetZone.Pictures.Bottom" model="Model"/>
</div>
<script>
$(document).ready(function () {
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Pictures.Bottom.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Pictures.Bottom.cshtml
new file mode 100644
index 000000000..b57690790
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Pictures.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_pictures_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Pictures.Top.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Pictures.Top.cshtml
new file mode 100644
index 000000000..04182faca
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.Pictures.Top.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_pictures_top" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Pictures.Bottom.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Pictures.Bottom.cshtml
new file mode 100644
index 000000000..34f7c8d32
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Pictures.Bottom.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_pictures_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Pictures.Top.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Pictures.Top.cshtml
new file mode 100644
index 000000000..9f4f75195
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.Pictures.Top.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_pictures_top" additional-data="Model"/>