webdav portal mobile view added, content type counted

This commit is contained in:
vfedosevich 2015-02-25 02:36:39 -08:00
parent 4122caa16d
commit 346059195e
13 changed files with 111 additions and 41 deletions

View file

@ -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
{