public static string LinkSourceResponse(long siteId, long id)
        {
            var siteModel = new SiteModel(siteId);
            var ss        = SiteSettingsUtilities.Get(siteModel, id);

            switch (ss.ReferenceType)
            {
            case "Issues": return(IssueUtilities.EditorJson(ss, id));

            case "Results": return(ResultUtilities.EditorJson(ss, id));

            default: return(null);
            }
        }
Esempio n. 2
0
        public string EditorJson()
        {
            SetSite(initSiteSettings: true);
            switch (ReferenceType)
            {
            case "Sites": return(SiteUtilities.EditorJson(Site));

            case "Issues": return(IssueUtilities.EditorJson(
                                      Site.SiteSettings, ReferenceId));

            case "Results": return(ResultUtilities.EditorJson(
                                       Site.SiteSettings, ReferenceId));

            case "Wikis": return(WikiUtilities.EditorJson(
                                     Site.SiteSettings, ReferenceId));

            default: return(Messages.ResponseNotFound().ToJson());
            }
        }