public static int GetImageIndex(CmsAssetType assetType) { if (assetType.HasFlag(CmsAssetType.LibraryFolder)) { return(3); } if (assetType.HasFlag(CmsAssetType.Site)) { return(4); } if (assetType.HasFlag(CmsAssetType.Project)) { return(5); } if (assetType.HasFlag(CmsAssetType.WorkflowsFolder)) { return(6); } if (assetType.HasFlag(CmsAssetType.Folder)) { return(2); } if (assetType.HasFlag(CmsAssetType.TemplatesFolder)) { return(2); } if (assetType.HasFlag(CmsAssetType.TemplateFolder)) { return(2); } return(1); }
public static bool AssetTypeCanHaveChildren(CmsAssetType assetType) { return(assetType.HasFlag(CmsAssetType.Folder) || assetType.HasFlag(CmsAssetType.Project) || assetType.HasFlag(CmsAssetType.Site) || assetType.HasFlag(CmsAssetType.TemplatesFolder) || assetType.HasFlag(CmsAssetType.TemplateFolder) || assetType.HasFlag(CmsAssetType.LibraryFolder) || assetType.HasFlag(CmsAssetType.WorkflowsFolder)); }