Add project files.
This commit is contained in:
9
Vidly/Views/Shared/Error.cshtml
Normal file
9
Vidly/Views/Shared/Error.cshtml
Normal file
@ -0,0 +1,9 @@
|
||||
@model System.Web.Mvc.HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
10
Vidly/Views/Shared/Lockout.cshtml
Normal file
10
Vidly/Views/Shared/Lockout.cshtml
Normal file
@ -0,0 +1,10 @@
|
||||
@model System.Web.Mvc.HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Locked Out";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h1 class="text-danger">Locked out.</h1>
|
||||
<h2 class="text-danger">This account has been locked out, please try again later.</h2>
|
||||
</hgroup>
|
||||
44
Vidly/Views/Shared/_Layout.cshtml
Normal file
44
Vidly/Views/Shared/_Layout.cshtml
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title - My ASP.NET Application</title>
|
||||
@Styles.Render("~/Content/css")
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<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>
|
||||
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
||||
<li>@Html.ActionLink("About", "About", "Home")</li>
|
||||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - My ASP.NET Application</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
22
Vidly/Views/Shared/_LoginPartial.cshtml
Normal file
22
Vidly/Views/Shared/_LoginPartial.cshtml
Normal file
@ -0,0 +1,22 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@if (Request.IsAuthenticated)
|
||||
{
|
||||
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||
</li>
|
||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
||||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
|
||||
</ul>
|
||||
}
|
||||
Reference in New Issue
Block a user