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.

Plugin Shipping.ByWeight - change type of project to Microsoft.NET.Sdk.Razor

KrzysztofPajak876ed043658d
diff --git a/src/Plugins/Shipping.ByWeight/Controllers/ShippingByWeightController.cs b/src/Plugins/Shipping.ByWeight/Areas/Admin/Controllers/ShippingByWeightController.cs
similarity index 97%
rename from src/Plugins/Shipping.ByWeight/Controllers/ShippingByWeightController.cs
rename to src/Plugins/Shipping.ByWeight/Areas/Admin/Controllers/ShippingByWeightController.cs
index 8471892c0..df52ea9a1 100644
--- a/src/Plugins/Shipping.ByWeight/Controllers/ShippingByWeightController.cs
+++ b/src/Plugins/Shipping.ByWeight/Areas/Admin/Controllers/ShippingByWeightController.cs
@@ -74,7 +74,7 @@ namespace Shipping.ByWeight.Controllers
model.LimitMethodsToCreated = _shippingByWeightSettings.LimitMethodsToCreated;
model.DisplayOrder = _shippingByWeightSettings.DisplayOrder;
- return View("~/Plugins/Shipping.ByWeight/Views/Configure.cshtml", model);
+ return View(model);
}
[HttpPost]
@@ -202,7 +202,7 @@ namespace Shipping.ByWeight.Controllers
//states
model.AvailableStates.Add(new SelectListItem { Text = "*", Value = "" });
- return View("~/Plugins/Shipping.ByWeight/Views/AddPopup.cshtml", model);
+ return View(model);
}
[HttpPost]
@@ -228,7 +228,7 @@ namespace Shipping.ByWeight.Controllers
ViewBag.RefreshPage = true;
- return View("~/Plugins/Shipping.ByWeight/Views/AddPopup.cshtml", model);
+ return View(model);
}
//edit
@@ -289,7 +289,7 @@ namespace Shipping.ByWeight.Controllers
foreach (var s in states)
model.AvailableStates.Add(new SelectListItem { Text = s.Name, Value = s.Id.ToString(), Selected = (selectedState != null && s.Id == selectedState.Id) });
- return View("~/Plugins/Shipping.ByWeight/Views/EditPopup.cshtml", model);
+ return View(model);
}
[HttpPost]
[AutoValidateAntiforgeryToken]
@@ -316,7 +316,7 @@ namespace Shipping.ByWeight.Controllers
ViewBag.RefreshPage = true;
- return View("~/Plugins/Shipping.ByWeight/Views/EditPopup.cshtml", model);
+ return View(model);
}
}
}
diff --git a/src/Plugins/Shipping.ByWeight/Views/AddPopup.cshtml b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/AddPopup.cshtml
similarity index 90%
rename from src/Plugins/Shipping.ByWeight/Views/AddPopup.cshtml
rename to src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/AddPopup.cshtml
index 33d42bcf9..57c8f052f 100644
--- a/src/Plugins/Shipping.ByWeight/Views/AddPopup.cshtml
+++ b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/AddPopup.cshtml
@@ -24,7 +24,7 @@
</div>
</div>
<div class="x_content form">
- <partial name="~/Plugins/Shipping.ByWeight/Views/_CreateOrUpdate.cshtml" model="Model" />
+ <partial name="_CreateOrUpdate" model="Model" />
</div>
</div>
</div>
diff --git a/src/Plugins/Shipping.ByWeight/Views/Configure.cshtml b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/Configure.cshtml
similarity index 100%
rename from src/Plugins/Shipping.ByWeight/Views/Configure.cshtml
rename to src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/Configure.cshtml
diff --git a/src/Plugins/Shipping.ByWeight/Views/EditPopup.cshtml b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/EditPopup.cshtml
similarity index 90%
rename from src/Plugins/Shipping.ByWeight/Views/EditPopup.cshtml
rename to src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/EditPopup.cshtml
index 4b6fe12db..95bf7c932 100644
--- a/src/Plugins/Shipping.ByWeight/Views/EditPopup.cshtml
+++ b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/EditPopup.cshtml
@@ -23,7 +23,7 @@
</div>
</div>
<div class="x_content form">
- <partial name="~/Plugins/Shipping.ByWeight/Views/_CreateOrUpdate.cshtml" model="Model" />
+ <partial name="_CreateOrUpdate" model="Model" />
</div>
</div>
</div>
diff --git a/src/Plugins/Shipping.ByWeight/Views/_CreateOrUpdate.cshtml b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/_CreateOrUpdate.cshtml
similarity index 100%
rename from src/Plugins/Shipping.ByWeight/Views/_CreateOrUpdate.cshtml
rename to src/Plugins/Shipping.ByWeight/Areas/Admin/Views/ShippingByWeight/_CreateOrUpdate.cshtml
diff --git a/src/Plugins/Shipping.ByWeight/Views/_ViewImports.cshtml b/src/Plugins/Shipping.ByWeight/Areas/Admin/Views/_ViewImports.cshtml
similarity index 100%
rename from src/Plugins/Shipping.ByWeight/Views/_ViewImports.cshtml
rename to src/Plugins/Shipping.ByWeight/Areas/Admin/Views/_ViewImports.cshtml
diff --git a/src/Plugins/Shipping.ByWeight/Shipping.ByWeight.csproj b/src/Plugins/Shipping.ByWeight/Shipping.ByWeight.csproj
index dd786d2ac..62d4b6025 100644
--- a/src/Plugins/Shipping.ByWeight/Shipping.ByWeight.csproj
+++ b/src/Plugins/Shipping.ByWeight/Shipping.ByWeight.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
@@ -7,6 +7,7 @@
<Company>UNIT-SOFT Sp. z o.o.</Company>
<PackageProjectUrl>https://grandnode.com/</PackageProjectUrl>
<TieredCompilation>true</TieredCompilation>
+ <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -73,21 +74,6 @@
<None Update="logo.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Update="Views\AddPopup.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Update="Views\Configure.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Update="Views\EditPopup.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Update="Views\_CreateOrUpdate.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Update="Views\_ViewImports.cshtml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
</ItemGroup>
</Project>
\ No newline at end of file