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.

Migrate CreateOrUpdate.ProductAttributes.cshtml to AdminShared (ARCH-001 Phase 2)

KrzysztofPajak00ec639e0306
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
similarity index 59%
rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
rename to src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
index 44c495ef9..0aec78bf4 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
@@ -1,38 +1,38 @@
-@model ProductModel
+@model ProductModel
@if (!string.IsNullOrEmpty(Model.Id))
{
if (Model.AvailableProductAttributes.Count > 0)
{
<admin-tabstrip name="productattribute-edit">
<items>
- <tabstrip-item text="@Loc["Admin.Catalog.Products.ProductAttributes.Attributes"]" tab-index="100" class="k-state-active">
+ <tabstrip-item text="@Loc[$"{Scope.ResourceKeyPrefix}.Catalog.Products.ProductAttributes.Attributes"]" tab-index="100" class="k-state-active">
<content>
<div>
<partial name="Partials/CreateOrUpdate.ProductAttributes.TabAttributes" model="Model"/>
</div>
</content>
</tabstrip-item>
- <tabstrip-item text="@Loc["Admin.Catalog.Products.ProductAttributes.AttributeCombinations"]" tab-index="101">
+ <tabstrip-item text="@Loc[$"{Scope.ResourceKeyPrefix}.Catalog.Products.ProductAttributes.AttributeCombinations"]" tab-index="101">
<content>
<div>
<partial name="Partials/CreateOrUpdate.ProductAttributes.TabAttributeCombinations" model="Model"/>
</div>
</content>
</tabstrip-item>
- <vc:admin-widget widget-zone="product_details_attribute_details_tabs" additional-data="Model"/>
+ <partial name="Partials/WidgetZone.AttributeDetailsTabs" model="Model"/>
</items>
</admin-tabstrip>
}
else
{
<div class="note note-info">
- @Loc["Admin.Catalog.Products.ProductAttributes.NoAttributesAvailable"]
+ @Loc[$"{Scope.ResourceKeyPrefix}.Catalog.Products.ProductAttributes.NoAttributesAvailable"]
</div>
}
}
else
{
<div class="note note-info">
- @Loc["Admin.Catalog.Products.ProductAttributes.SaveBeforeEdit"]
+ @Loc[$"{Scope.ResourceKeyPrefix}.Catalog.Products.ProductAttributes.SaveBeforeEdit"]
</div>
}
\ No newline at end of file
diff --git a/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.AttributeDetailsTabs.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.AttributeDetailsTabs.cshtml
new file mode 100644
index 000000000..289028357
--- /dev/null
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/WidgetZone.AttributeDetailsTabs.cshtml
@@ -0,0 +1 @@
+<vc:admin-widget widget-zone="product_details_attribute_details_tabs" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
deleted file mode 100644
index 44c495ef9..000000000
--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
+++ /dev/null
@@ -1,38 +0,0 @@
-@model ProductModel
-@if (!string.IsNullOrEmpty(Model.Id))
-{
- if (Model.AvailableProductAttributes.Count > 0)
- {
- <admin-tabstrip name="productattribute-edit">
- <items>
- <tabstrip-item text="@Loc["Admin.Catalog.Products.ProductAttributes.Attributes"]" tab-index="100" class="k-state-active">
- <content>
- <div>
- <partial name="Partials/CreateOrUpdate.ProductAttributes.TabAttributes" model="Model"/>
- </div>
- </content>
- </tabstrip-item>
- <tabstrip-item text="@Loc["Admin.Catalog.Products.ProductAttributes.AttributeCombinations"]" tab-index="101">
- <content>
- <div>
- <partial name="Partials/CreateOrUpdate.ProductAttributes.TabAttributeCombinations" model="Model"/>
- </div>
- </content>
- </tabstrip-item>
- <vc:admin-widget widget-zone="product_details_attribute_details_tabs" additional-data="Model"/>
- </items>
- </admin-tabstrip>
- }
- else
- {
- <div class="note note-info">
- @Loc["Admin.Catalog.Products.ProductAttributes.NoAttributesAvailable"]
- </div>
- }
-}
-else
-{
- <div class="note note-info">
- @Loc["Admin.Catalog.Products.ProductAttributes.SaveBeforeEdit"]
- </div>
-}
\ No newline at end of file
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
deleted file mode 100644
index bd2295764..000000000
--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/CreateOrUpdate.ProductAttributes.cshtml
+++ /dev/null
@@ -1,38 +0,0 @@
-@model ProductModel
-@if (!string.IsNullOrEmpty(Model.Id))
-{
- if (Model.AvailableProductAttributes.Count > 0)
- {
- <admin-tabstrip name="productattribute-edit">
- <items>
- <tabstrip-item text="@Loc["Vendor.Catalog.Products.ProductAttributes.Attributes"]" tab-index="100" class="k-state-active">
- <content>
- <div>
- <partial name="Partials/CreateOrUpdate.ProductAttributes.TabAttributes" model="Model"/>
- </div>
- </content>
- </tabstrip-item>
- <tabstrip-item text="@Loc["Vendor.Catalog.Products.ProductAttributes.AttributeCombinations"]" tab-index="101">
- <content>
- <div>
- <partial name="Partials/CreateOrUpdate.ProductAttributes.TabAttributeCombinations" model="Model"/>
- </div>
- </content>
- </tabstrip-item>
- <vc:vendor-widget widget-zone="vendor_product_details_attribute_details_tabs" additional-data="Model"/>
- </items>
- </admin-tabstrip>
- }
- else
- {
- <div class="note note-info">
- @Loc["Vendor.Catalog.Products.ProductAttributes.NoAttributesAvailable"]
- </div>
- }
-}
-else
-{
- <div class="note note-info">
- @Loc["Vendor.Catalog.Products.ProductAttributes.SaveBeforeEdit"]
- </div>
-}
\ No newline at end of file
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.AttributeDetailsTabs.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.AttributeDetailsTabs.cshtml
new file mode 100644
index 000000000..e082a6fdf
--- /dev/null
+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Product/Partials/WidgetZone.AttributeDetailsTabs.cshtml
@@ -0,0 +1 @@
+<vc:vendor-widget widget-zone="vendor_product_details_attribute_details_tabs" additional-data="Model"/>