webdav portal fixes
This commit is contained in:
parent
af64837b99
commit
fa588c8559
3 changed files with 10 additions and 1 deletions
|
@ -0,0 +1,7 @@
|
|||
namespace WebsitePanel.WebDavPortal.Constants
|
||||
{
|
||||
public class Formtas
|
||||
{
|
||||
public const string DateFormatWithTime = "MM/dd/yyyy hh:mm tt";
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ using AutoMapper;
|
|||
using WebsitePanel.WebDav.Core.Client;
|
||||
using WebsitePanel.WebDav.Core.Config;
|
||||
using WebsitePanel.WebDav.Core.Extensions;
|
||||
using WebsitePanel.WebDavPortal.Constants;
|
||||
using WebsitePanel.WebDavPortal.FileOperations;
|
||||
using WebsitePanel.WebDavPortal.Models.FileSystem;
|
||||
|
||||
|
@ -43,7 +44,7 @@ namespace WebsitePanel.WebDavPortal.Mapping.Profiles.Webdav
|
|||
.ForMember(ti => ti.IconHref, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder ? WebDavAppConfigManager.Instance.FileIcons.FolderPath.Trim('~') : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(hi.DisplayName.Trim('/'))].Trim('~')))
|
||||
.ForMember(ti => ti.IsTargetBlank, x => x.MapFrom(hi => openerManager.GetIsTargetBlank(hi)))
|
||||
.ForMember(ti => ti.LastModified, x => x.MapFrom(hi => hi.LastModified))
|
||||
.ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt")))
|
||||
.ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString(Formtas.DateFormatWithTime)))
|
||||
|
||||
.ForMember(ti => ti.Summary, x => x.MapFrom(hi => hi.Summary))
|
||||
.ForMember(ti => ti.IsRoot, x => x.MapFrom(hi => hi.IsRootItem))
|
||||
|
|
|
@ -165,6 +165,7 @@
|
|||
<Compile Include="Configurations\ActionSelectors\OwaActionSelector.cs" />
|
||||
<Compile Include="Configurations\Constraints\OrganizationRouteConstraint.cs" />
|
||||
<Compile Include="Configurations\ControllerConfigurations\OwaControllerConfiguration.cs" />
|
||||
<Compile Include="Constants\Formtas.cs" />
|
||||
<Compile Include="Controllers\AccountController.cs" />
|
||||
<Compile Include="Controllers\ErrorController.cs" />
|
||||
<Compile Include="Controllers\FileSystemController.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue