webdav portal filter + detail view added
This commit is contained in:
parent
280628e362
commit
51d432fd2e
156 changed files with 32494 additions and 260 deletions
|
@ -2,70 +2,30 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@using Ninject
|
||||
@using WebsitePanel.WebDav.Core.Config
|
||||
@using WebsitePanel.WebDav.Core.Entities.Account.Enums
|
||||
@using WebsitePanel.WebDav.Core.Interfaces.Managers
|
||||
@using WebsitePanel.WebDav.Core.Security.Authorization.Enums
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
@{
|
||||
ViewBag.Title = WebDavAppConfigManager.Instance.ApplicationName;
|
||||
}
|
||||
|
||||
|
||||
<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 id="breadcrumb_wrapper" class="container prevent-deselect">
|
||||
@if (Model != null)
|
||||
{
|
||||
string header = WspContext.User.OrganizationId;
|
||||
<a href="/@header/">@header</a>
|
||||
string[] elements = Model.UrlSuffix.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < elements.Length; i++)
|
||||
{
|
||||
<span style="top: 2px;"> / </span>
|
||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))">@elements[i]</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="container file-actions-menu prevent-deselect">
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<div class="file-deletion navbar-left">
|
||||
<a id="delete-button" class="btn btn-danger btn-sm active" role="button"
|
||||
data-target="#confirm-dialog"
|
||||
data-target-positive-button-text="@Resources.Delete"
|
||||
data-target-title-text="@Resources.DeleteFileQuestion"
|
||||
data-target-content="@Resources.DialogsContentConfrimFileDeletion">@Resources.Delete</a>
|
||||
</div>
|
||||
<a id="upload-button" class="btn btn-success btn-sm active navbar-right" data-toggle="modal" data-target="#file-upload" role="button">@Resources.FileUpload</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>
|
||||
@Html.Partial("_ShowContentTopMenu", Model)
|
||||
|
||||
Html.RenderAction("ContentList", "FileSystem", new { viewType = Request.Browser.IsMobileDevice ? FolderViewTypes.BigIcons : Model.UserSettings.WebDavViewType });
|
||||
}
|
||||
|
||||
@section scripts{
|
||||
<script>
|
||||
wsp.fileBrowser.setSettings({ deletionUrl: "@Url.RouteUrl(FileSystemRouteNames.DeleteFiles)" });
|
||||
recalculateResourseHeight();
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
|
@ -76,7 +36,7 @@ else
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-file-upload-title">@Resources.FileUpload</h4>
|
||||
<h4 class="modal-title" id="modal-file-upload-title">@UI.FileUpload</h4>
|
||||
</div>
|
||||
@using (Html.BeginRouteForm(FileSystemRouteNames.UploadFile, FormMethod.Post, new {enctype = "multipart/form-data"}))
|
||||
{
|
||||
|
@ -84,8 +44,8 @@ else
|
|||
<input type="file" name="file" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">@Resources.Close</button>
|
||||
<button type="submit" class="btn btn-primary processing-dialog">@Resources.Upload</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">@UI.Close</button>
|
||||
<button type="submit" class="btn btn-primary processing-dialog">@UI.Upload</button>
|
||||
</div>
|
||||
}
|
||||
</div><!-- /.modal-content -->
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
@using WebsitePanel.WebDav.Core.Config
|
||||
@using WebsitePanel.WebDavPortal.FileOperations
|
||||
@using Ninject;
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model IHierarchyItem
|
||||
|
@ -42,7 +43,7 @@
|
|||
<div class="element">
|
||||
<img class="icon-size" src="@Url.Content(actualPath)" />
|
||||
|
||||
<a href="@href" @Html.Raw(isTargetBlank ? "target=\"_blank\"" : string.Empty) class="file-link" title="@name">
|
||||
<a href="@href" @Html.Raw(isTargetBlank ? "target=\"_blank\"" : string.Empty) class="file-link processing-dialog" title="@name">
|
||||
<p style="word-wrap: break-word;">@name</p>
|
||||
</a>
|
||||
|
||||
|
@ -53,7 +54,7 @@
|
|||
<p class="progress-text">@percent%</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>@Math.Round(Convert.ToDecimal(resource.ContentLength) / 1024, 2) / @Math.Round(Convert.ToDecimal(resource.AllocatedSpace) / 1024, 2) @Resources.GigabyteShort</p>
|
||||
<p>@Math.Round(Convert.ToDecimal(resource.ContentLength) / 1024, 2) / @Math.Round(Convert.ToDecimal(resource.AllocatedSpace) / 1024, 2) @UI.GigabyteShort</p>
|
||||
}
|
||||
|
||||
<div class="selected-element-overlay">
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row" id="resourcesDiv">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (IHierarchyItem element in Model.Items)
|
||||
{
|
||||
@Html.Partial("_ResoursePartial", element)
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section scripts{
|
||||
@Scripts.Render("~/bundles/appScripts/storage/bigIcons")
|
||||
|
||||
<script>
|
||||
recalculateResourseHeight();
|
||||
</script>
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
|
||||
<div class="prevent-deselect">
|
||||
<table id="webdav-items-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@UI.Name</th>
|
||||
<th>@UI.Type</th>
|
||||
<th>@UI.Modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@section scripts{
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
wsp.fileBrowser.setSettings({ deletionUrl: "@Url.RouteUrl(FileSystemRouteNames.DeleteFiles)" });
|
||||
wsp.fileBrowser.initDataTable('#webdav-items-table','@Url.RouteUrl(FileSystemRouteNames.ShowContentDetails)');
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
@section popups
|
||||
{
|
||||
<div id="file-upload" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-file-upload-title" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-file-upload-title">@UI.FileUpload</h4>
|
||||
</div>
|
||||
@using (Html.BeginRouteForm(FileSystemRouteNames.UploadFile, FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<div class="modal-body">
|
||||
<input type="file" name="file" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">@UI.Close</button>
|
||||
<button type="submit" class="btn btn-primary processing-dialog">@UI.Upload</button>
|
||||
</div>
|
||||
}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ProcessDialog", null)
|
||||
@Html.Partial("_ConfirmDialog")
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
@using WebsitePanel.WebDav.Core.Entities.Account.Enums
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDav.Core.Security.Authorization.Enums
|
||||
@using WebsitePanel.WebDav.Core
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
|
||||
<div id="breadcrumb_wrapper" class="container prevent-deselect">
|
||||
@if (Model != null)
|
||||
{
|
||||
string header = WspContext.User.OrganizationId;
|
||||
<a href="/@header/" class="processing-dialog">@header</a>
|
||||
string[] elements = Model.UrlSuffix.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < elements.Length; i++)
|
||||
{
|
||||
<span style="top: 2px;"> / </span>
|
||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="processing-dialog">@elements[i]</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="container file-actions-menu prevent-deselect">
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<div class="file-deletion navbar-left">
|
||||
<a id="delete-button" class="btn btn-danger btn-sm active" role="button"
|
||||
data-target="#confirm-dialog"
|
||||
data-target-positive-button-text="@UI.Delete"
|
||||
data-target-title-text="@UI.DeleteFileQuestion"
|
||||
data-target-content="@UI.DialogsContentConfrimFileDeletion">@UI.Delete</a>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="navbar-right">
|
||||
@if (Request.Browser.IsMobileDevice == false)
|
||||
{
|
||||
<div class="btn-toolbar change-view-block" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" title="@UI.Details" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new { viewType = FolderViewTypes.BigIcons, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix })"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></a>
|
||||
<a class="btn btn-default" title="@UI.Table" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new { viewType = FolderViewTypes.Table, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix })"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<a id="upload-button" class="btn btn-success btn-sm active" data-toggle="modal" data-target="#file-upload" role="button">@UI.FileUpload</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -1,10 +1,11 @@
|
|||
@using WebsitePanel.WebDavPortal.UI
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI
|
||||
<div class="modal fade" id="confirm-dialog" tabindex="-1" role="dialog" aria-labelledby="confirm-dalog-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="confirm-dalog-label">@Resources.Confirm</h4>
|
||||
<h4 class="modal-title" id="confirm-dalog-label">@UI.Confirm</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
@ -12,8 +13,8 @@
|
|||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">@Resources.Cancel</button>
|
||||
<a href="#" class="btn btn-danger danger positive-button" data-dismiss="modal">@Resources.Yes</a>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">@UI.Cancel</button>
|
||||
<a href="#" class="btn btn-danger danger positive-button" data-dismiss="modal">@UI.Yes</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<title>@ViewBag.Title</title>
|
||||
<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">
|
||||
|
@ -26,7 +27,7 @@
|
|||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="@Url.RouteUrl(FileSystemRouteNames.ShowContentPath, new { pathPart = string.Empty })">
|
||||
<img class="header-logo" src="@Url.Content("~/Content/Images/logo.png")" />
|
||||
<img class="header-logo processing-dialog" src="@Url.Content("~/Content/Images/logo.png")" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
|
@ -54,8 +55,6 @@
|
|||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@Scripts.Render("~/bundles/appScripts")
|
||||
|
||||
|
||||
|
||||
@if (WspContext.User != null)
|
||||
{
|
||||
@Scripts.Render("~/bundles/authScripts")
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
@using WebsitePanel.WebDavPortal.UI
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI
|
||||
|
||||
<div id="processDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-process-dialog-title" data-backdrop="static" data-keyboard="false" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-vertical-centered">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="modal-process-dialog-title">@Resources.ProcessingWithDots</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
|
||||
</div>
|
||||
<div>
|
||||
<img src="~/Content/Images/indicator_medium.gif" />
|
||||
<h4 class="dialog-text">@UI.PleaseWaitWithDots</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue