webdav portal mobile view added, content type counted
This commit is contained in:
parent
4122caa16d
commit
346059195e
13 changed files with 111 additions and 41 deletions
|
@ -47,25 +47,14 @@ namespace WebsitePanel.WebDav.Core.Managers
|
|||
|
||||
if (string.IsNullOrWhiteSpace(pathPart))
|
||||
{
|
||||
var resources = ConnectToWebDavServer().Select(x => new WebDavResource { Href = new Uri(x.Url), ItemType = ItemType.Folder }).ToArray();
|
||||
|
||||
var items = WSP.Services.EnterpriseStorage.GetEnterpriseFolders(WspContext.User.ItemId);
|
||||
|
||||
foreach (var resource in resources)
|
||||
children = ConnectToWebDavServer().Select(x => new WebDavResource
|
||||
{
|
||||
var folder = items.FirstOrDefault(x => x.Name == resource.DisplayName);
|
||||
|
||||
if (folder == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
resource.ContentLength = folder.Size;
|
||||
resource.AllocatedSpace = folder.FRSMQuotaMB;
|
||||
resource.IsRootItem = true;
|
||||
}
|
||||
|
||||
children = resources;
|
||||
Href = new Uri(x.Url),
|
||||
ItemType = ItemType.Folder,
|
||||
ContentLength = x.Size,
|
||||
AllocatedSpace = x.FRSMQuotaMB,
|
||||
IsRootItem = true
|
||||
}).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue