public JsonResult _FolderPath(int folderId) { var folder = ContentFolderService.GetById(folderId); return(Json(new { success = true, path = folder.PathInfo.Path, url = folder.PathInfo.Url, libraryPath = folder.OsSpecificPath })); }
public JsonResult _FolderPath(int folderId) { var folder = ContentFolderService.GetById(folderId); return(new JsonResult { Data = new { success = true, path = folder.PathInfo.Path, url = folder.PathInfo.Url, libraryPath = folder.Path }, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
/// <summary> /// Делает невидимыми некоторые элементы контекстного меню для корневого Content Folder /// </summary> public static IEnumerable <BackendActionStatus> ResolveStatusesForContentFolder(this IEnumerable <BackendActionStatus> statuses, int entityId) { var folder = ContentFolderService.GetById(entityId); if (!folder.ParentId.HasValue) { var codes = new[] { ActionCode.ContentFolderProperties, ActionCode.RemoveContentFolder }; foreach (var status in statuses) { if (codes.Contains(status.Code)) { status.Visible = false; } } } return(statuses); }