Information class needed by the edit-ui, to provide optimal syntax helpers etc.
コード例 #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);
        }
コード例 #2
0
ファイル: AssetEditor.cs プロジェクト: Bumsteer/2sxc
        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);
        }
コード例 #3
0
ファイル: AssetEditor.cs プロジェクト: 2sic/2sxc
        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);
        }
コード例 #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);
        }
コード例 #5
0
ファイル: AssetEditor.cs プロジェクト: Bumsteer/2sxc
        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);
        }
コード例 #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);
        }
コード例 #7
0
ファイル: AssetEditor.cs プロジェクト: 2sic/2sxc
 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;
 }