Released windows auth, connect to ES.Services.
This commit is contained in:
parent
2569e55609
commit
d29c347ff4
294 changed files with 329583 additions and 2315 deletions
|
@ -0,0 +1,36 @@
|
|||
@model WebsitePanel.WebDavPortal.Models.AccountModel
|
||||
@{
|
||||
ViewBag.Title = "Login";
|
||||
}
|
||||
|
||||
<br/>
|
||||
<div class="container row">
|
||||
<form class="form-horizontal" method="POST" role="form">
|
||||
<div class="form-group">
|
||||
<h3 class="col-sm-offset-1">Authentication on the LDAP server</h3>
|
||||
</div>
|
||||
@if (Model != null && !string.IsNullOrEmpty(Model.LdapError))
|
||||
{
|
||||
<div class="form-group">
|
||||
<span class="col-sm-offset-1" style="color: #A94442; font-weight: bold;">@Model.LdapError</span>
|
||||
</div>
|
||||
}
|
||||
<div class="form-group">
|
||||
<label for="inputEmail" class="col-sm-2 control-label">Login</label>
|
||||
<div class="col-sm-10">
|
||||
@Html.TextBoxFor(x => x.Login, new { @class = "form-control", id = "inputPassword", placeholder = "Login" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-10">
|
||||
@Html.PasswordFor(x => x.Password, new { @class = "form-control", id = "inputPassword", placeholder = "Password" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">Sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,8 @@
|
|||
@model WebsitePanel.WebDavPortal.Models.ErrorModel
|
||||
@{
|
||||
ViewBag.Title = Model.HttpStatusCode;
|
||||
}
|
||||
<br/>
|
||||
<h4 id="errorMessage">
|
||||
@Html.Raw(Model.Message)
|
||||
</h4>
|
|
@ -0,0 +1,45 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
@{
|
||||
ViewBag.Title = (string.IsNullOrEmpty(Model.UrlSuffix) ? "root" : Model.UrlSuffix);
|
||||
}
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/appScripts")
|
||||
|
||||
<script>
|
||||
recalculateResourseHeight();
|
||||
</script>
|
||||
|
||||
<br />
|
||||
@if (Model != null && !string.IsNullOrEmpty(Model.Error))
|
||||
{
|
||||
<span class="col-sm-offset-1" style="color: #A94442; font-weight: bold;">@Model.Error</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="container">
|
||||
@if (Model != null)
|
||||
{
|
||||
const string header = "root";
|
||||
<a href="/root/" class="btn btn-primary btn-sm active" role="button">@header</a>
|
||||
string[] elements = Model.UrlSuffix.Split(new[] {"/"}, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < elements.Length; i++)
|
||||
{
|
||||
<span class="glyphicon glyphicon-chevron-right" style="top: 2px;"></span>
|
||||
<a href="@string.Concat("/root/", string.Join("/", elements.Take(i + 1)))" class="btn btn-primary btn-sm active" role="button">@elements[i]</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<br />
|
||||
<div class="container">
|
||||
<div class="row" id="resourcesDiv">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (IHierarchyItem element in Model.Items)
|
||||
{
|
||||
@Html.Partial("_ResoursePartial", element)
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
@model WebsitePanel.WebDavPortal.Models.OfficeOnlineModel
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@Model.FileName</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src='@Model.Url' width="100%" height="100%" frameborder='0' style="bottom: 0px; left: 0px; position: fixed; right: 0px; top: 0px;">
|
||||
This is an embedded
|
||||
<a target='_blank' href='http://office.com'>Microsoft Office</a> document, powered by
|
||||
<a target='_blank' href='http://office.com/webapps'>Office Web Apps</a>.
|
||||
</iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
@model IEnumerable<WebsitePanel.WebDav.Core.Client.IHierarchyItem>
|
||||
|
||||
@foreach (var element in Model)
|
||||
{
|
||||
@Html.Partial("_ResoursePartial", element)
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@using WebsitePanel.WebDavPortal.Config
|
||||
@using WebsitePanel.WebDavPortal.FileOperations
|
||||
@model IHierarchyItem
|
||||
|
||||
@{
|
||||
string actualPath = Model.ItemType == ItemType.Folder ? "~/Content/Images/folder_100x100.png" : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(Model.DisplayName.Trim('/'))];
|
||||
string name = Model.ItemType == ItemType.Folder ? Model.DisplayName.Trim('/') : Path.GetFileNameWithoutExtension(Model.DisplayName);
|
||||
var opener = new FileOpenerManager()[Path.GetExtension(Model.DisplayName)];
|
||||
bool isTargetBlank;
|
||||
string href = "/";
|
||||
switch (opener)
|
||||
{
|
||||
case FileOpenerType.OfficeOnline:
|
||||
isTargetBlank = true;
|
||||
href = string.Concat(Url.Action("ShowOfficeDocument", "FileSystem"), Model.DisplayName);
|
||||
break;
|
||||
default:
|
||||
isTargetBlank = false;
|
||||
href = string.Concat(Url.Action("ShowContent", "FileSystem"), Model.DisplayName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
<div class="col-sm-2 element-container">
|
||||
<a href="@href" @Html.Raw(isTargetBlank ? "target=\"_blank\"" : string.Empty) title="@Model.DisplayName.Trim('/')">
|
||||
<img class="icon-size" src="@Url.Content(actualPath)" />
|
||||
<p style="word-wrap: break-word;">@name</p>
|
||||
</a>
|
||||
</div>
|
|
@ -0,0 +1,17 @@
|
|||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!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>
|
|
@ -0,0 +1,45 @@
|
|||
@using Ninject
|
||||
@using WebsitePanel.WebDavPortal.Config
|
||||
@using WebsitePanel.WebDavPortal.DependencyInjection
|
||||
@using WebsitePanel.WebDavPortal.Models
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title</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(WebDavAppConfigManager.Instance.ApplicationName, "Login", "Account", new { area = "" }, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
@{
|
||||
IKernel kernel = new StandardKernel(new NinjectSettings { AllowNullInjection = true }, new WebDavExplorerAppModule());
|
||||
var account = kernel.Get<AccountModel>();
|
||||
if (account != null)
|
||||
{
|
||||
<h4 class="nav navbar-text navbar-right">@account.Login</h4>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
</div>
|
||||
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Optimization"/>
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="WebsitePanel.WebDavPortal" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -0,0 +1,3 @@
|
|||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue