move model declaration outside of clode block
This commit is contained in:
parent
e781d00419
commit
b8dbfa3104
@ -1,6 +1,7 @@
|
|||||||
@{
|
@model Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels.IndexViewModel
|
||||||
|
|
||||||
|
@{
|
||||||
ViewData["Title"] = "Catalog";
|
ViewData["Title"] = "Catalog";
|
||||||
@model Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels.IndexViewModel
|
|
||||||
}
|
}
|
||||||
<section class="esh-catalog-hero">
|
<section class="esh-catalog-hero">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -27,31 +28,31 @@
|
|||||||
<br />
|
<br />
|
||||||
@if(ViewBag.BasketInoperativeMsg != null)
|
@if(ViewBag.BasketInoperativeMsg != null)
|
||||||
{
|
{
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
@ViewBag.BasketInoperativeMsg
|
@ViewBag.BasketInoperativeMsg
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (Model.CatalogItems.Count() > 0)
|
@if (Model.CatalogItems.Count() > 0)
|
||||||
{
|
{
|
||||||
<partial name="_pagination" for="PaginationInfo" />
|
<partial name="_pagination" for="PaginationInfo" />
|
||||||
|
|
||||||
<div class="esh-catalog-items row">
|
<div class="esh-catalog-items row">
|
||||||
@foreach (var catalogItem in Model.CatalogItems)
|
@foreach (var catalogItem in Model.CatalogItems)
|
||||||
{
|
{
|
||||||
<div class="esh-catalog-item col-md-4">
|
<div class="esh-catalog-item col-md-4">
|
||||||
<partial name="_product" model="catalogItem"/>
|
<partial name="_product" model="catalogItem" />
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
<partial name="_pagination" for="PaginationInfo"/>
|
<partial name="_pagination" for="PaginationInfo" />
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div class="esh-catalog-items row">
|
<div class="esh-catalog-items row">
|
||||||
THERE ARE NO RESULTS THAT MATCH YOUR SEARCH
|
THERE ARE NO RESULTS THAT MATCH YOUR SEARCH
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user