WebDav explorer [Beta]
This commit is contained in:
parent
6c6b4b29a5
commit
3396e34c8e
27 changed files with 2119 additions and 1713 deletions
|
@ -1,7 +1,9 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@using Ninject
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
@{
|
||||
ViewBag.Title = (string.IsNullOrEmpty(Model.UrlSuffix) ? "root" : Model.UrlSuffix);
|
||||
var webDavManager = (new StandardKernel(new WebsitePanel.WebDavPortal.DependencyInjection.WebDavExplorerAppModule())).Get<WebsitePanel.WebDavPortal.Models.IWebDavManager>();
|
||||
ViewBag.Title = (string.IsNullOrEmpty(Model.UrlSuffix) ? webDavManager.OrganizationName : Model.UrlSuffix);
|
||||
}
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/appScripts")
|
||||
|
@ -20,13 +22,13 @@ 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 header = webDavManager.OrganizationName;
|
||||
<a href="/@header/" 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>
|
||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="btn btn-primary btn-sm active" role="button">@elements[i]</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@using WebsitePanel.WebDavPortal.Config
|
||||
@using WebsitePanel.WebDavPortal.FileOperations
|
||||
@using Ninject;
|
||||
@model IHierarchyItem
|
||||
|
||||
@{
|
||||
|
@ -17,7 +18,9 @@
|
|||
break;
|
||||
default:
|
||||
isTargetBlank = false;
|
||||
href = string.Concat(Url.Action("ShowContent", "FileSystem"), Model.DisplayName);
|
||||
IKernel _kernel = new StandardKernel(new WebsitePanel.WebDavPortal.DependencyInjection.WebDavExplorerAppModule());
|
||||
var webDavManager = _kernel.Get<WebsitePanel.WebDavPortal.Models.IWebDavManager>();
|
||||
href = Model.Href.AbsolutePath;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue