Beispiel #1
0
        public static String ToAppData(IAppData data, MvcContext ctx)
        {
            if (data == null)
            {
                return("");
            }

            // 1) html
            if (ctx != null && ctx.IsMock && ctx.GetItem("_makeHtml") != null)
            {
                return(HtmlLink.ToAppData(data));
            }

            String controllerPath = getAppDataController(data.GetType().FullName, data.AppId);

            // 2) link map
            String x = LinkMap.To(data.OwnerType, data.OwnerUrl, controllerPath, "Show", data.Id, data.AppId);

            if (x != null)
            {
                return(x);
            }


            // 3)
            return(To(data, controllerPath, "Show", data.Id));
        }
Beispiel #2
0
        public static String ToAppData(IAppData data, MvcContext ctx)
        {
            if (data == null)
            {
                return("");
            }

            if (ctx != null && ctx.IsMock && ctx.GetItem("_makeHtml") != null)
            {
                return(HtmlLink.ToAppData(data));
            }

            String controllerPath = getAppDataController(data.GetType().FullName, data.AppId);

            return(To(data, controllerPath, "Show", data.Id));
        }