From e781d004197acfab25992c0b20f6a7ac393d4bb8 Mon Sep 17 00:00:00 2001 From: Lee Dumond Date: Thu, 18 Apr 2019 10:34:08 -0500 Subject: [PATCH 1/2] move model declaration outside of code block --- src/Web/WebMVC/Views/Campaigns/Details.cshtml | 6 ++- src/Web/WebMVC/Views/Campaigns/Index.cshtml | 46 ++++++++++--------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/Web/WebMVC/Views/Campaigns/Details.cshtml b/src/Web/WebMVC/Views/Campaigns/Details.cshtml index 979a6bce6..aaf0151b1 100644 --- a/src/Web/WebMVC/Views/Campaigns/Details.cshtml +++ b/src/Web/WebMVC/Views/Campaigns/Details.cshtml @@ -1,6 +1,8 @@ +@model CampaignItem + @{ ViewData["Title"] = "Campaign details"; - @model CampaignItem + var headerList= new List
() { new Header() { Controller = "Catalog", Text = "Back to catalog" }, new Header() { Controller = "Campaigns", Text = "Back to Campaigns" } }; @@ -18,7 +20,7 @@ Card image cap

@Model.Name

-

@Model.Description

+

@Model.Description

- +

- + @if (!ViewData.ModelState.IsValid) { -
- @Html.ValidationSummary(false) -
- } +
+ @Html.ValidationSummary(false) +
+ }
UPDATE USER LOCATION -
+

@@ -44,33 +46,33 @@ Lon
-
+
- - + +
- @if (Model != null && Model.CampaignItems !=null && Model.CampaignItems.Any()) + @if (Model != null && Model.CampaignItems !=null && Model.CampaignItems.Any()) { -
- @foreach (var catalogItem in Model.CampaignItems) +
+ @foreach (var catalogItem in Model.CampaignItems) { -
- -
+
+ +
} -
+
- + } else { -
- THERE ARE NO CAMPAIGNS -
+
+ THERE ARE NO CAMPAIGNS +
} From b8dbfa31045f3e801918e512118c2f094daf2b4b Mon Sep 17 00:00:00 2001 From: Lee Dumond Date: Thu, 18 Apr 2019 10:47:21 -0500 Subject: [PATCH 2/2] move model declaration outside of clode block --- src/Web/WebMVC/Views/Catalog/Index.cshtml | 33 ++++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/Web/WebMVC/Views/Catalog/Index.cshtml b/src/Web/WebMVC/Views/Catalog/Index.cshtml index e8f26d345..3428d4470 100644 --- a/src/Web/WebMVC/Views/Catalog/Index.cshtml +++ b/src/Web/WebMVC/Views/Catalog/Index.cshtml @@ -1,6 +1,7 @@ -@{ +@model Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels.IndexViewModel + +@{ ViewData["Title"] = "Catalog"; - @model Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels.IndexViewModel }
@@ -27,31 +28,31 @@
@if(ViewBag.BasketInoperativeMsg != null) { - + }
@if (Model.CatalogItems.Count() > 0) { - + -
- @foreach (var catalogItem in Model.CatalogItems) +
+ @foreach (var catalogItem in Model.CatalogItems) { -
- -
- } +
+
+ } +
- + } else { -
- THERE ARE NO RESULTS THAT MATCH YOUR SEARCH -
+
+ THERE ARE NO RESULTS THAT MATCH YOUR SEARCH +
}