Information class needed by the edit-ui, to provide optimal syntax helpers etc.
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }