websitepanel/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
2015-03-03 06:41:52 -08:00

85 lines
3.1 KiB
Text

@using System.Web.Script.Serialization
@using Ninject
@using WebsitePanel.WebDav.Core
@using WebsitePanel.WebDav.Core.Config
@using WebsitePanel.WebDavPortal.DependencyInjection
@using WebsitePanel.WebDavPortal.Models
@using WebsitePanel.WebDavPortal.UI.Routes;
@model WebsitePanel.WebDavPortal.Models.Common.BaseModel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>@(ViewBag.Title ?? WebDavAppConfigManager.Instance.ApplicationName)</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top prevent-deselect">
<div class="container top-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="@Url.RouteUrl(FileSystemRouteNames.ShowContentPath, new { pathPart = string.Empty })">
<img class="header-logo processing-dialog" src="@Url.Content("~/Content/Images/logo.png")" />
</a>
</div>
<div class="navbar-collapse collapse">
@{
if (WspContext.User != null)
{
<a id="logout" class="nav navbar-text navbar-right" href="@Url.RouteUrl(AccountRouteNames.Logout)" title="Log out"><i class="glyphicon glyphicon-log-out"></i></a>
<h4 id="username" class="nav navbar-text navbar-right">@WspContext.User.Login</h4>
}
}
</div>
</div>
</div>
<div class="container body-content">
<div id="message-area" class="container prevent-deselect"> </div>
@RenderBody()
</div>
<div class="prevent-deselect">
@Html.Partial("_ProcessDialog", null)
@Html.Partial("_ConfirmDialog")
@RenderSection("popups", required: false)
</div>
<div class="manual-scripts">
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/appScripts")
</div>
@if (WspContext.User != null)
{
@Scripts.Render("~/bundles/authScripts")
<script>
$(document).ready(function () {
StartAuthExpirationCheckTimer("@WebDavAppConfigManager.Instance.AuthTimeoutCookieName", "@FormsAuthentication.FormsCookieName", "@Url.RouteUrl(AccountRouteNames.Logout)");
});
</script>
}
@if (Model != null)
{
<script>
$(document).ready(function () {
wsp.messages.showMessages(@Html.Raw(Json.Encode(Model.Messages)));
});
</script>
}
@RenderSection("scripts", required: false)
</body>
</html>