Exercise Files
This commit is contained in:
13
Ch04/04_02_End/Website/Views/Shared/Error.cshtml
Normal file
13
Ch04/04_02_End/Website/Views/Shared/Error.cshtml
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
<hgroup>
|
||||
<h1>Error.</h1>
|
||||
<h2>An error occurred while processing your request.</h2>
|
||||
</hgroup>
|
||||
</body>
|
||||
</html>
|
||||
72
Ch04/04_02_End/Website/Views/Shared/_Layout.cshtml
Normal file
72
Ch04/04_02_End/Website/Views/Shared/_Layout.cshtml
Normal file
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title - H+ Sport</title>
|
||||
<link rel="dns-prefetch" href="//fonts.googleapis.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
|
||||
@Styles.Render("~/Content/css")
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
<link rel="icon" href="https://hplussport.com/wp-content/uploads/2015/12/cropped-HSport_01-32x32.png" sizes="32x32">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="~/" class="navbar-brand">
|
||||
<img src="~/Content/logo.png" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6 text-center title navbar-header">
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown">
|
||||
@if (User.IsInRole(HPlusSports.Models.UserRoles.Admin))
|
||||
{
|
||||
<a class="dropbtn" href="@Url.Action("Index", "Inventory")">
|
||||
<i class="glyphicon glyphicon-list-alt"></i>
|
||||
Inventory
|
||||
</a>
|
||||
}
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
@Html.Action("MenuCart", "Products")
|
||||
</li>
|
||||
<li>
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<form method="post" action="@Url.Action("Logoff", "Account", new { area = "" })">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-default">Logout</button>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
<a href="@Url.Action("Login", "Account")" class="btn btn-default">Login</a>
|
||||
</div>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main" class="container">
|
||||
@RenderBody()
|
||||
</div>
|
||||
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.30.1/js/jquery.tablesorter.min.js"></script>
|
||||
@Scripts.Render("~/bundles/site")
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user