public AssetEditor(App app, string path, bool isSuperUser, bool isAdmin, bool global = false) { _app = app; _userIsSuperUser = isSuperUser; _userIsAdmin = isAdmin; EditInfo = new AssetEditInfo(_app.AppId, _app.Name, path, global); }
public AssetEditor(App app, string path, UserInfo userInfo, PortalSettings portalSettings, bool global = false) { _app = app; _userInfo = userInfo; _portalSettings = portalSettings; EditInfo = new AssetEditInfo(_app.AppId, _app.Name, path, global); }
public AssetEditor(App app, int templateId, bool isSuperUser, bool isAdmin) { _app = app; _userIsSuperUser = isSuperUser; _userIsAdmin = isAdmin; var template = _app.TemplateManager.GetTemplate(templateId); EditInfo = TemplateAssetsInfo(template); }
public AssetEditor(App app, int templateId, UserInfo userInfo, PortalSettings portalSettings)//, bool global = false) { _app = app; _userInfo = userInfo; _portalSettings = portalSettings; var template = _app.TemplateManager.GetTemplate(templateId); EditInfo = TemplateAssetsInfo(template); }
private AssetEditInfo TemplateAssetsInfo(Template templ) { var t = new AssetEditInfo(_app.AppId, _app.Name, templ.Path, templ.Location == Settings.TemplateLocations.HostFileSystem) { // Template specific properties, not really available in other files LocationScope = templ.Location, Type = templ.Type, Name = templ.Name, HasList = templ.UseForList, TypeContent = templ.ContentTypeStaticName, TypeContentPresentation = templ.PresentationTypeStaticName, TypeList = templ.ListContentTypeStaticName, TypeListPresentation = templ.ListPresentationTypeStaticName }; return(t); }
private AssetEditInfo TemplateAssetsInfo(Template templ) { var t = new AssetEditInfo(_app.AppId, _app.Name, templ.Path, templ.Location == Settings.TemplateLocations.HostFileSystem) { // Template specific properties, not really available in other files LocationScope = templ.Location, Type = templ.Type, Name = templ.Name, HasList = templ.UseForList, TypeContent = templ.ContentTypeStaticName, TypeContentPresentation = templ.PresentationTypeStaticName, TypeList = templ.ListContentTypeStaticName, TypeListPresentation = templ.ListPresentationTypeStaticName }; return t; }