Used TagHelper instead of Razor to render partial view
This commit is contained in:
parent
b0b9045a08
commit
12b1be780e
@ -1,28 +1,30 @@
|
||||
@{
|
||||
ViewData["Title"] = "Campaign details";
|
||||
@model CampaignItem
|
||||
ViewData["Title"] = "Campaign details";
|
||||
var headers = new List<Header>{
|
||||
new Header { Controller = "Campaigns", Text = "Back to Campaigns" },
|
||||
new Header { Controller = "Catalog", Text = "Back to catalog" }
|
||||
};
|
||||
@model CampaignItem
|
||||
}
|
||||
<section class="esh-campaigns-hero">
|
||||
<div class="container">
|
||||
<img class="esh-campaigns-title" src="~/images/main_banner_text.png" />
|
||||
</div>
|
||||
<div class="container">
|
||||
<img class="esh-campaigns-title" src="~/images/main_banner_text.png" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" },
|
||||
new Header() { Controller = "Campaigns", Text = "Back to Campaigns" } })
|
||||
<partial name="_Header" model="headers" />
|
||||
|
||||
<div class="container">
|
||||
<div class="card esh-campaigns-items">
|
||||
<img class="card-img-top" src="@Model.PictureUri" alt="Card image cap">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">@Model.Name</h4>
|
||||
<p class="card-text">@Model.Description</p>
|
||||
<p class="card-text">
|
||||
<small class="text-muted">
|
||||
From @Model.From.ToString("MMMM dd, yyyy") until @Model.To.ToString("MMMM dd, yyyy")
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card esh-campaigns-items">
|
||||
<img class="card-img-top" src="@Model.PictureUri" alt="Card image cap">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">@Model.Name</h4>
|
||||
<p class="card-text">@Model.Description</p>
|
||||
<p class="card-text">
|
||||
<small class="text-muted">
|
||||
From @Model.From.ToString("MMMM dd, yyyy") until @Model.To.ToString("MMMM dd, yyyy")
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,72 +1,75 @@
|
||||
@{
|
||||
ViewData["Title"] = "Campaigns";
|
||||
@model WebMVC.ViewModels.CampaignViewModel
|
||||
ViewData["Title"] = "Campaigns";
|
||||
@model WebMVC.ViewModels.CampaignViewModel
|
||||
var headers = new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } };
|
||||
}
|
||||
|
||||
<section class="esh-campaigns-hero">
|
||||
<div class="container">
|
||||
<img class="esh-campaigns-title" src="~/images/main_banner_text.png" />
|
||||
</div>
|
||||
<div class="container">
|
||||
<img class="esh-campaigns-title" src="~/images/main_banner_text.png" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } })
|
||||
<partial name="_Header" model="headers" />
|
||||
|
||||
<div class="container">
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
@if (!ViewData.ModelState.IsValid)
|
||||
{
|
||||
<div class="alert alert-warning">
|
||||
@Html.ValidationSummary(false)
|
||||
</div>
|
||||
}
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="esh-campaigns-items" style="font-weight: 300;">
|
||||
UPDATE USER LOCATION
|
||||
</div>
|
||||
@if (!ViewData.ModelState.IsValid)
|
||||
{
|
||||
<div class="alert alert-warning">
|
||||
@Html.ValidationSummary(false)
|
||||
</div>
|
||||
}
|
||||
|
||||
<form class="form-inline" asp-action="CreateNewUserLocation" method="post">
|
||||
<label class="sr-only" for="longitudeInput">Name</label>
|
||||
|
||||
<div class="input-group mb-2 mr-sm-2 mb-sm-0">
|
||||
<div class="input-group-addon">Lat</div>
|
||||
<input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" id="latitudeInput" asp-for="Lat" placeholder="Latitude">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="esh-campaigns-items" style="font-weight: 300;">
|
||||
UPDATE USER LOCATION
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-2 mr-sm-2 mb-sm-0">
|
||||
<div class="input-group-addon">Lon</div>
|
||||
<input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" id="longitudeInput" asp-for="Lon" placeholder="Longitude">
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-2 mr-sm-2 mb-sm-0 col-md-2">
|
||||
<input type="submit" value="Update" class="btn esh-campaigns-form-button" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@if (Model != null && Model.CampaignItems !=null && Model.CampaignItems.Any())
|
||||
{
|
||||
<div class="card-group esh-campaigns-items row">
|
||||
@foreach (var catalogItem in Model.CampaignItems)
|
||||
{
|
||||
<div class="esh-campaigns-item col-md-4">
|
||||
@Html.Partial("_campaign", catalogItem)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<form class="form-inline" asp-action="CreateNewUserLocation" method="post">
|
||||
<label class="sr-only" for="longitudeInput">Name</label>
|
||||
|
||||
@Html.Partial("_pagination", Model.PaginationInfo)
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="esh-campaigns-items row">
|
||||
THERE ARE NO CAMPAIGNS
|
||||
</div>
|
||||
}
|
||||
<div class="input-group mb-2 mr-sm-2 mb-sm-0">
|
||||
<div class="input-group-addon">Lat</div>
|
||||
<input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" id="latitudeInput" asp-for="Lat" placeholder="Latitude">
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-2 mr-sm-2 mb-sm-0">
|
||||
<div class="input-group-addon">Lon</div>
|
||||
<input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" id="longitudeInput" asp-for="Lon" placeholder="Longitude">
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-2 mr-sm-2 mb-sm-0 col-md-2">
|
||||
<input type="submit" value="Update" class="btn esh-campaigns-form-button" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@if (Model != null && Model.CampaignItems != null && Model.CampaignItems.Any())
|
||||
{
|
||||
<div class="card-group esh-campaigns-items row">
|
||||
@foreach (var catalogItem in Model.CampaignItems)
|
||||
{
|
||||
<div class="esh-campaigns-item col-md-4">
|
||||
@*@Html.Partial("_campaign", catalogItem)*@
|
||||
<partial name="_campaign" model="catalogItem" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@*@Html.Partial("_pagination", Model.PaginationInfo)*@
|
||||
<partial name="_pagination" model="Model.PaginationInfo" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="esh-campaigns-items row">
|
||||
THERE ARE NO CAMPAIGNS
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
@inject IIdentityParser<ApplicationUser> UserManager
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "My Cart";
|
||||
ViewData["Title"] = "My Cart";
|
||||
var headers = new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } };
|
||||
}
|
||||
|
||||
<form method="post" id="cartForm">
|
||||
<div class="esh-basket">
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } })
|
||||
|
||||
@await Component.InvokeAsync("CartList", new { user = UserManager.Parse(User) })
|
||||
</div>
|
||||
<div class="esh-basket">
|
||||
<partial name="_header" model="headers" />
|
||||
@await Component.InvokeAsync("CartList", new { user = UserManager.Parse(User) })
|
||||
</div>
|
||||
</form>
|
||||
|
@ -1,57 +1,57 @@
|
||||
@{
|
||||
ViewData["Title"] = "Catalog";
|
||||
@model Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels.IndexViewModel
|
||||
ViewData["Title"] = "Catalog";
|
||||
@model Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels.IndexViewModel
|
||||
}
|
||||
<section class="esh-catalog-hero">
|
||||
<div class="container">
|
||||
<img class="esh-catalog-title" src="~/images/main_banner_text.png" />
|
||||
</div>
|
||||
<div class="container">
|
||||
<img class="esh-catalog-title" src="~/images/main_banner_text.png" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="esh-catalog-filters">
|
||||
<div class="container">
|
||||
<form asp-action="Index" asp-controller="Catalog" method="post">
|
||||
<label class="esh-catalog-label" data-title="brand">
|
||||
<select asp-for="@Model.BrandFilterApplied" asp-items="@Model.Brands" class="esh-catalog-filter"></select>
|
||||
</label>
|
||||
<label class="esh-catalog-label" data-title="type">
|
||||
<select asp-for="@Model.TypesFilterApplied" asp-items="@Model.Types" class="esh-catalog-filter"></select>
|
||||
</label>
|
||||
<input class="esh-catalog-send" type="image" src="~/images/arrow-right.svg" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="container">
|
||||
<form asp-action="Index" asp-controller="Catalog" method="post">
|
||||
<label class="esh-catalog-label" data-title="brand">
|
||||
<select asp-for="@Model.BrandFilterApplied" asp-items="@Model.Brands" class="esh-catalog-filter"></select>
|
||||
</label>
|
||||
<label class="esh-catalog-label" data-title="type">
|
||||
<select asp-for="@Model.TypesFilterApplied" asp-items="@Model.Types" class="esh-catalog-filter"></select>
|
||||
</label>
|
||||
<input class="esh-catalog-send" type="image" src="~/images/arrow-right.svg" />
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<br />
|
||||
@if(ViewBag.BasketInoperativeMsg != null)
|
||||
{
|
||||
<div class="alert alert-warning" role="alert">
|
||||
@ViewBag.BasketInoperativeMsg
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<br />
|
||||
@if (ViewBag.BasketInoperativeMsg != null)
|
||||
{
|
||||
<div class="alert alert-warning" role="alert">
|
||||
@ViewBag.BasketInoperativeMsg
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (Model.CatalogItems.Count() > 0)
|
||||
{
|
||||
@Html.Partial("_pagination", Model.PaginationInfo)
|
||||
@if (Model.CatalogItems.Count() > 0)
|
||||
{
|
||||
<partial name="_pagination" model="Model.PaginationInfo" />
|
||||
|
||||
<div class="esh-catalog-items row">
|
||||
@foreach (var catalogItem in Model.CatalogItems)
|
||||
{
|
||||
<div class="esh-catalog-item col-md-4">
|
||||
@Html.Partial("_product", catalogItem)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="esh-catalog-items row">
|
||||
@foreach (var catalogItem in Model.CatalogItems)
|
||||
{
|
||||
<div class="esh-catalog-item col-md-4">
|
||||
<partial name="_product" , model="catalogItem" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@Html.Partial("_pagination", Model.PaginationInfo)
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="esh-catalog-items row">
|
||||
THERE ARE NO RESULTS THAT MATCH YOUR SEARCH
|
||||
</div>
|
||||
}
|
||||
<partial name="_pagination" model="Model.PaginationInfo" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="esh-catalog-items row">
|
||||
THERE ARE NO RESULTS THAT MATCH YOUR SEARCH
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
@ -3,103 +3,105 @@
|
||||
@inject IIdentityParser<ApplicationUser> UserManager
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "New Order";
|
||||
ViewData["Title"] = "New Order";
|
||||
var header = new Header { Controller = "Cart", Text = "Back to cart" };
|
||||
}
|
||||
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Cart", Text = "Back to cart" } })
|
||||
<partial name="_header" model="new List<Header> { header }" />
|
||||
|
||||
<div class="container">
|
||||
<form method="post" asp-controller="Order" asp-action="Checkout">
|
||||
<section class="esh-orders_new-section">
|
||||
<div class="row">
|
||||
@foreach (var error in ViewData.ModelState.Values.SelectMany(err => err.Errors)) {
|
||||
<div class="alert alert-warning" role="alert">
|
||||
@error.ErrorMessage
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<h4 class="esh-orders_new-title">Shipping address</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="Street" class="esh-orders_new-title">Address</label>
|
||||
<input asp-for="Street" class="form-control form-input" type="text" placeholder="Street"/>
|
||||
<span asp-validation-for="Street" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="City" class="esh-orders_new-title">City</label>
|
||||
<input asp-for="City" class="form-control form-input" type="text" placeholder="City"/>
|
||||
<span asp-validation-for="City" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="State" class="esh-orders_new-title">State</label>
|
||||
<input asp-for="State" class="form-control form-input" type="text" placeholder="State"/>
|
||||
<span asp-validation-for="State" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="Country" class="esh-orders_new-title">Country</label>
|
||||
<input asp-for="Country" class="form-control form-input" type="text" placeholder="Country"/>
|
||||
<span asp-validation-for="Country" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="esh-orders_new-section">
|
||||
<h4 class="esh-orders_new-title">Payment method</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardNumber" class="esh-orders_new-title">Card number</label>
|
||||
<input asp-for="CardNumber" class="form-control form-input" type="text" placeholder="000000000000000"/>
|
||||
<span asp-validation-for="CardNumber" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardHolderName" class="esh-orders_new-title">Cardholder name</label>
|
||||
<input asp-for="CardHolderName" class="form-control form-input" type="text" placeholder="Cardholder"/>
|
||||
<span asp-validation-for="CardHolderName" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardExpirationShort" class="esh-orders_new-title">Expiration date</label>
|
||||
<input asp-for="CardExpirationShort" class="form-control form-input form-input-medium" type="text" placeholder="MM/YY"/>
|
||||
<span asp-validation-for="CardExpirationShort" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardSecurityNumber" class="esh-orders_new-title">Security code</label>
|
||||
<input asp-for="CardSecurityNumber" class="form-control form-input form-input-small" type="text" placeholder="000"/>
|
||||
<span asp-validation-for="CardSecurityNumber" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<form method="post" asp-controller="Order" asp-action="Checkout">
|
||||
<section class="esh-orders_new-section">
|
||||
<div class="row">
|
||||
@foreach (var error in ViewData.ModelState.Values.SelectMany(err => err.Errors))
|
||||
{
|
||||
<div class="alert alert-warning" role="alert">
|
||||
@error.ErrorMessage
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<h4 class="esh-orders_new-title">Shipping address</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="Street" class="esh-orders_new-title">Address</label>
|
||||
<input asp-for="Street" class="form-control form-input" type="text" placeholder="Street" />
|
||||
<span asp-validation-for="Street" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="City" class="esh-orders_new-title">City</label>
|
||||
<input asp-for="City" class="form-control form-input" type="text" placeholder="City" />
|
||||
<span asp-validation-for="City" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="State" class="esh-orders_new-title">State</label>
|
||||
<input asp-for="State" class="form-control form-input" type="text" placeholder="State" />
|
||||
<span asp-validation-for="State" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="Country" class="esh-orders_new-title">Country</label>
|
||||
<input asp-for="Country" class="form-control form-input" type="text" placeholder="Country" />
|
||||
<span asp-validation-for="Country" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="esh-orders_new-section">
|
||||
<h4 class="esh-orders_new-title">Payment method</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardNumber" class="esh-orders_new-title">Card number</label>
|
||||
<input asp-for="CardNumber" class="form-control form-input" type="text" placeholder="000000000000000" />
|
||||
<span asp-validation-for="CardNumber" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardHolderName" class="esh-orders_new-title">Cardholder name</label>
|
||||
<input asp-for="CardHolderName" class="form-control form-input" type="text" placeholder="Cardholder" />
|
||||
<span asp-validation-for="CardHolderName" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardExpirationShort" class="esh-orders_new-title">Expiration date</label>
|
||||
<input asp-for="CardExpirationShort" class="form-control form-input form-input-medium" type="text" placeholder="MM/YY" />
|
||||
<span asp-validation-for="CardExpirationShort" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="CardSecurityNumber" class="esh-orders_new-title">Security code</label>
|
||||
<input asp-for="CardSecurityNumber" class="form-control form-input form-input-small" type="text" placeholder="000" />
|
||||
<span asp-validation-for="CardSecurityNumber" class="alert alert-danger" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@await Html.PartialAsync("_OrderItems")
|
||||
<partial name="_OrderItems" />
|
||||
|
||||
<section class="esh-orders_new-section">
|
||||
<div class="form-group">
|
||||
<div class="col-md-9">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" value="[ Place Order ]" name="action" class="btn esh-orders_new-placeOrder" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<input asp-for="ZipCode" type="hidden" />
|
||||
<input asp-for="RequestId" type="hidden" value="@Guid.NewGuid().ToString()"/>
|
||||
</form>
|
||||
<section class="esh-orders_new-section">
|
||||
<div class="form-group">
|
||||
<div class="col-md-9">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" value="[ Place Order ]" name="action" class="btn esh-orders_new-placeOrder" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<input asp-for="ZipCode" type="hidden" />
|
||||
<input asp-for="RequestId" type="hidden" value="@Guid.NewGuid().ToString()" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
<partial name="_ValidationScriptsPartial" />
|
||||
}
|
||||
|
@ -3,88 +3,89 @@
|
||||
@model Microsoft.eShopOnContainers.WebMVC.ViewModels.Order
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Order Detail";
|
||||
ViewData["Title"] = "Order Detail";
|
||||
var headers = new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } };
|
||||
}
|
||||
|
||||
<div class="esh-orders_detail">
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } })
|
||||
<partial name="_Header" model="headers" />
|
||||
|
||||
<div class="container">
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-3">Order number</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">Date</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">Total</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">Status</section>
|
||||
</article>
|
||||
<div class="container">
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-3">Order number</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">Date</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">Total</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">Status</section>
|
||||
</article>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-3">@Model.OrderNumber</section>
|
||||
<section class="esh-orders_detail-item col-xs-3">@Model.Date</section>
|
||||
<section class="esh-orders_detail-item col-xs-3">$@Model.Total</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">@Model.Status</section>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-12">Description</section>
|
||||
</article>
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-3">@Model.OrderNumber</section>
|
||||
<section class="esh-orders_detail-item col-xs-3">@Model.Date</section>
|
||||
<section class="esh-orders_detail-item col-xs-3">$@Model.Total</section>
|
||||
<section class="esh-orders_detail-title col-xs-3">@Model.Status</section>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.Description</section>
|
||||
</article>
|
||||
</section>
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-12">Description</section>
|
||||
</article>
|
||||
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-12">Shiping address</section>
|
||||
</article>
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.Description</section>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.Street</section>
|
||||
</article>
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-12">Shiping address</section>
|
||||
</article>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.City</section>
|
||||
</article>
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.Street</section>
|
||||
</article>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.Country</section>
|
||||
</article>
|
||||
</section>
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.City</section>
|
||||
</article>
|
||||
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-12">ORDER DETAILS</section>
|
||||
</article>
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-12">@Model.Country</section>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@for (int i = 0; i < Model.OrderItems.Count; i++)
|
||||
{
|
||||
var item = Model.OrderItems[i];
|
||||
<article class="esh-orders_detail-items esh-orders_detail-items--border row">
|
||||
<section class="esh-orders_detail-item col-md-4 hidden-md-down">
|
||||
<img class="esh-orders_detail-image" src="@item.PictureUrl">
|
||||
</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-4">@item.ProductName</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-1">$ @item.UnitPrice.ToString("N2")</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-1">@item.Units</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-2">$ @Math.Round(item.Units * item.UnitPrice, 2).ToString("N2")</section>
|
||||
</article>
|
||||
}
|
||||
</section>
|
||||
<section class="esh-orders_detail-section">
|
||||
<article class="esh-orders_detail-titles row">
|
||||
<section class="esh-orders_detail-title col-xs-12">ORDER DETAILS</section>
|
||||
</article>
|
||||
|
||||
<section class="esh-orders_detail-section esh-orders_detail-section--right">
|
||||
<article class="esh-orders_detail-titles esh-basket-titles--clean row">
|
||||
<section class="esh-orders_detail-title col-xs-9"></section>
|
||||
<section class="esh-orders_detail-title col-xs-2">TOTAL</section>
|
||||
</article>
|
||||
@for (int i = 0; i < Model.OrderItems.Count; i++)
|
||||
{
|
||||
var item = Model.OrderItems[i];
|
||||
<article class="esh-orders_detail-items esh-orders_detail-items--border row">
|
||||
<section class="esh-orders_detail-item col-md-4 hidden-md-down">
|
||||
<img class="esh-orders_detail-image" src="@item.PictureUrl">
|
||||
</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-4">@item.ProductName</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-1">$ @item.UnitPrice.ToString("N2")</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-1">@item.Units</section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--middle col-xs-2">$ @Math.Round(item.Units * item.UnitPrice, 2).ToString("N2")</section>
|
||||
</article>
|
||||
}
|
||||
</section>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-9"></section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--mark col-xs-2">$ @Model.Total</section>
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
<section class="esh-orders_detail-section esh-orders_detail-section--right">
|
||||
<article class="esh-orders_detail-titles esh-basket-titles--clean row">
|
||||
<section class="esh-orders_detail-title col-xs-9"></section>
|
||||
<section class="esh-orders_detail-title col-xs-2">TOTAL</section>
|
||||
</article>
|
||||
|
||||
<article class="esh-orders_detail-items row">
|
||||
<section class="esh-orders_detail-item col-xs-9"></section>
|
||||
<section class="esh-orders_detail-item esh-orders_detail-item--mark col-xs-2">$ @Model.Total</section>
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,45 +3,47 @@
|
||||
@model IEnumerable<Microsoft.eShopOnContainers.WebMVC.ViewModels.Order>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "My Orders";
|
||||
ViewData["Title"] = "My Orders";
|
||||
var headers = new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" },
|
||||
new Header() { Text = " / " },
|
||||
new Header() { Controller = "OrderManagement", Text = "Orders Management" }
|
||||
};
|
||||
}
|
||||
|
||||
<div class="esh-orders">
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" },
|
||||
new Header() { Text = " / " },
|
||||
new Header() { Controller = "OrderManagement", Text = "Orders Management" } })
|
||||
<partial name="_Header" model="headers" />
|
||||
|
||||
<div class="container">
|
||||
<article class="esh-orders-titles row">
|
||||
<section class="esh-orders-title col-xs-2">Order number</section>
|
||||
<section class="esh-orders-title col-xs-4">Date</section>
|
||||
<section class="esh-orders-title col-xs-2">Total</section>
|
||||
<section class="esh-orders-title col-xs-2">Status</section>
|
||||
<section class="esh-orders-title col-xs-2"></section>
|
||||
</article>
|
||||
@if (Model != null && Model.Any())
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<article class="esh-orders-items row">
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.OrderNumber)</section>
|
||||
<section class="esh-orders-item col-xs-4">@Html.DisplayFor(modelItem => item.Date)</section>
|
||||
<section class="esh-orders-item col-xs-2">$ @Html.DisplayFor(modelItem => item.Total)</section>
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.Status)</section>
|
||||
<section class="esh-orders-item col-xs-1">
|
||||
<a class="esh-orders-link" asp-controller="Order" asp-action="Detail" asp-route-orderId="@item.OrderNumber">Detail</a>
|
||||
</section>
|
||||
<section class="esh-orders-item col-xs-1">
|
||||
@if (item.Status.ToLower() == "submitted")
|
||||
{
|
||||
<a class="esh-orders-link" asp-controller="Order" asp-action="cancel" asp-route-orderId="@item.OrderNumber">Cancel</a>
|
||||
}
|
||||
</section>
|
||||
</article>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="container">
|
||||
<article class="esh-orders-titles row">
|
||||
<section class="esh-orders-title col-xs-2">Order number</section>
|
||||
<section class="esh-orders-title col-xs-4">Date</section>
|
||||
<section class="esh-orders-title col-xs-2">Total</section>
|
||||
<section class="esh-orders-title col-xs-2">Status</section>
|
||||
<section class="esh-orders-title col-xs-2"></section>
|
||||
</article>
|
||||
@if (Model != null && Model.Any())
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<article class="esh-orders-items row">
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.OrderNumber)</section>
|
||||
<section class="esh-orders-item col-xs-4">@Html.DisplayFor(modelItem => item.Date)</section>
|
||||
<section class="esh-orders-item col-xs-2">$ @Html.DisplayFor(modelItem => item.Total)</section>
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.Status)</section>
|
||||
<section class="esh-orders-item col-xs-1">
|
||||
<a class="esh-orders-link" asp-controller="Order" asp-action="Detail" asp-route-orderId="@item.OrderNumber">Detail</a>
|
||||
</section>
|
||||
<section class="esh-orders-item col-xs-1">
|
||||
@if (item.Status.ToLower() == "submitted")
|
||||
{
|
||||
<a class="esh-orders-link" asp-controller="Order" asp-action="cancel" asp-route-orderId="@item.OrderNumber">Cancel</a>
|
||||
}
|
||||
</section>
|
||||
</article>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -3,41 +3,42 @@
|
||||
@model IEnumerable<Microsoft.eShopOnContainers.WebMVC.ViewModels.Order>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "My Orders";
|
||||
ViewData["Title"] = "My Orders";
|
||||
var headers = new List<Header>() {
|
||||
new Header { Controller = " Catalog", Text="Back to catalog" } };
|
||||
}
|
||||
|
||||
<div class="esh-orders">
|
||||
@Html.Partial("_Header", new List<Header>() {
|
||||
new Header() { Controller = "Catalog", Text = "Back to catalog" } })
|
||||
<partial name="_Header" model="headers" />
|
||||
|
||||
<div class="container">
|
||||
<article class="esh-orders-titles row">
|
||||
<section class="esh-orders-title col-xs-2">Order number</section>
|
||||
<section class="esh-orders-title col-xs-4">Date</section>
|
||||
<section class="esh-orders-title col-xs-2">Total</section>
|
||||
<section class="esh-orders-title col-xs-2">Status</section>
|
||||
<section class="esh-orders-title col-xs-2"></section>
|
||||
</article>
|
||||
<div class="container">
|
||||
<article class="esh-orders-titles row">
|
||||
<section class="esh-orders-title col-xs-2">Order number</section>
|
||||
<section class="esh-orders-title col-xs-4">Date</section>
|
||||
<section class="esh-orders-title col-xs-2">Total</section>
|
||||
<section class="esh-orders-title col-xs-2">Status</section>
|
||||
<section class="esh-orders-title col-xs-2"></section>
|
||||
</article>
|
||||
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<article class="esh-orders-items row">
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.OrderNumber)</section>
|
||||
<section class="esh-orders-item col-xs-4">@Html.DisplayFor(modelItem => item.Date)</section>
|
||||
<section class="esh-orders-item col-xs-2">$ @Html.DisplayFor(modelItem => item.Total)</section>
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.Status)</section>
|
||||
<section class="esh-orders-item col-xs-2">
|
||||
<form asp-action="OrderProcess" id="orderForm+@item.OrderNumber" method="post">
|
||||
<input type="hidden" name="orderId" value="@item.OrderNumber" />
|
||||
<select name="actionCode" asp-items="@item.ActionCodeSelectList"
|
||||
disabled=@(item.Status != "paid")
|
||||
onchange="document.getElementById('orderForm+@item.OrderNumber').submit()">
|
||||
<option value=""> Select Action</option>
|
||||
<option value="">------------------</option>
|
||||
</select>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
}
|
||||
</div>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<article class="esh-orders-items row">
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.OrderNumber)</section>
|
||||
<section class="esh-orders-item col-xs-4">@Html.DisplayFor(modelItem => item.Date)</section>
|
||||
<section class="esh-orders-item col-xs-2">$ @Html.DisplayFor(modelItem => item.Total)</section>
|
||||
<section class="esh-orders-item col-xs-2">@Html.DisplayFor(modelItem => item.Status)</section>
|
||||
<section class="esh-orders-item col-xs-2">
|
||||
<form asp-action="OrderProcess" id="orderForm+@item.OrderNumber" method="post">
|
||||
<input type="hidden" name="orderId" value="@item.OrderNumber" />
|
||||
<select name="actionCode" asp-items="@item.ActionCodeSelectList"
|
||||
disabled=@(item.Status != "paid")
|
||||
onchange="document.getElementById('orderForm+@item.OrderNumber').submit()">
|
||||
<option value=""> Select Action</option>
|
||||
<option value="">------------------</option>
|
||||
</select>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
}
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user