Information class needed by the edit-ui, to provide optimal syntax helpers etc.
Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
        }
Exemple #7
0
 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;
 }