public AssetEditor Init(IApp app, int templateId, bool isSuperUser, bool isAdmin, ILog parentLog) { InitShared(app, isSuperUser, isAdmin, parentLog); var template = _cmsRuntime.Views.Get(templateId); EditInfo = TemplateAssetsInfo(template); return(this); }
public AssetEditor(IApp app, string path, bool isSuperUser, bool isAdmin, bool global, ILog parentLog) : base("Sxc.AstEdt", parentLog) { _app = app; _userIsSuperUser = isSuperUser; _userIsAdmin = isAdmin; EditInfo = new AssetEditInfo(_app.AppId, _app.Name, path, global); }
public AssetEditor(IApp app, int templateId, bool isSuperUser, bool isAdmin, ILog parentLog) : base("Sxc.AstEdt", parentLog) { _app = app; _userIsSuperUser = isSuperUser; _userIsAdmin = isAdmin; // todo: 2dm Views - see if we can get logger to flow var template = new CmsRuntime(app, Log, true, false).Views.Get(templateId); EditInfo = TemplateAssetsInfo(template); }
private AssetEditInfo TemplateAssetsInfo(IView view) { var t = new AssetEditInfo(_app.AppId, _app.Name, view.Path, view.IsShared) { // Template specific properties, not really available in other files Type = view.Type, Name = view.Name, HasList = view.UseForList, TypeContent = view.ContentType, TypeContentPresentation = view.PresentationType, TypeList = view.HeaderType, TypeListPresentation = view.HeaderPresentationType }; return(t); }
private AssetEditInfo TemplateAssetsInfo(IView view) { var t = new AssetEditInfo(_app.AppId, _app.Name, view.Path, view.Location == Settings.TemplateLocations.HostFileSystem) { // Template specific properties, not really available in other files LocationScope = view.Location, Type = view.Type, Name = view.Name, HasList = view.UseForList, TypeContent = view.ContentType, TypeContentPresentation = view.PresentationType, TypeList = view.HeaderType, TypeListPresentation = view.HeaderPresentationType }; return(t); }
public AssetEditor Init(IApp app, string path, bool isSuperUser, bool isAdmin, bool global, ILog parentLog) { InitShared(app, isSuperUser, isAdmin, parentLog); EditInfo = new AssetEditInfo(_app.AppId, _app.Name, path, global); return(this); }