public string Format(SlickFormatterContext ctx) { var dbFile = ctx.Value as string; if (string.IsNullOrEmpty(dbFile)) { return(""); } var downloadUrl = DbFileUrl(dbFile); var originalName = !string.IsNullOrEmpty(OriginalNameProperty) ? ctx.Item[OriginalNameProperty] as string : null; originalName = originalName ?? ""; var text = string.Format(DisplayFormat ?? "{0}", originalName, dbFile, downloadUrl); return("<a class='file-download-link' target='_blank' " + "href='" + Q.AttrEncode(downloadUrl) + "'>" + Q.HtmlEncode(text) + "</a>"); }
public string Format(SlickFormatterContext ctx) { return "<span class='shipper-symbol shipper-" + ((ctx.Value as string) ?? "").Replace(" ", "") + "'>" + Q.HtmlEncode(ctx.Value) + "</span>"; }
public string Format(SlickFormatterContext ctx) { if (!Script.IsValue(ctx.Value)) return ""; if (Q.IsTrue(ctx.Value)) return Q.HtmlEncode(Q.TryGetText(TrueText) ?? TrueText ?? Q.TryGetText("Dialogs.YesButton") ?? "Yes"); return Q.HtmlEncode(Q.TryGetText(FalseText) ?? FalseText ?? Q.TryGetText("Dialogs.NoButton") ?? "No"); }
public string Format(SlickFormatterContext ctx) { var text = Q.HtmlEncode(ctx.Value); if (string.IsNullOrEmpty(GenderProperty)) return text; var gender = ctx.Item[GenderProperty] as Gender?; return "<span class='" + (gender == Gender.Female ? "employee-symbol female" : "employee-symbol male") + "'>" + text + "</span>"; }
public string Format(SlickFormatterContext ctx) { if (!Script.IsValue(ctx.Value)) { return(""); } if (Q.IsTrue(ctx.Value)) { return(Q.HtmlEncode(Q.TryGetText(TrueText) ?? TrueText ?? Q.TryGetText("Dialogs.YesButton") ?? "Yes")); } return(Q.HtmlEncode(Q.TryGetText(FalseText) ?? FalseText ?? Q.TryGetText("Dialogs.NoButton") ?? "No")); }
public string Format(SlickFormatterContext ctx) { var url = !string.IsNullOrEmpty(UrlProperty) ? ((object)(ctx.Item[UrlProperty] ?? "")).ToString() : ((object)(ctx.Value ?? "")).ToString(); if (string.IsNullOrEmpty(url)) { return(""); } if (!string.IsNullOrEmpty(UrlFormat)) { url = string.Format(UrlFormat, url); } if (url != null && url.StartsWith("~/")) { url = Q.ResolveUrl(url); } var display = !string.IsNullOrEmpty(DisplayProperty) ? ((object)ctx.Item[DisplayProperty] ?? "").ToString() : ((object)(ctx.Value ?? "")).ToString(); if (!string.IsNullOrEmpty(DisplayFormat)) { display = string.Format(DisplayFormat, display); } var s = "<a href='" + Q.AttrEncode(url) + "'"; if (!string.IsNullOrEmpty(Target)) { s += " target='" + Target + "'"; } s += ">" + Q.HtmlEncode(display) + "</a>"; return(s); }
public string Format(SlickFormatterContext ctx) { var dbFile = ctx.Value as string; if (string.IsNullOrEmpty(dbFile)) return ""; var downloadUrl = DbFileUrl(dbFile); var originalName = !string.IsNullOrEmpty(OriginalNameProperty) ? ctx.Item[OriginalNameProperty] as string : null; originalName = originalName ?? ""; var text = string.Format(DisplayFormat ?? "{0}", originalName, dbFile, downloadUrl); return "<a class='file-download-link' target='_blank' " + "href='" + Q.HtmlEncode(downloadUrl) + "'>" + Q.HtmlEncode(text) + "</a>"; }
public string Format(SlickFormatterContext ctx) { return Format(ctx.Value, DisplayFormat); }
public string Format(SlickFormatterContext ctx) { return(Format(ctx.Value, DisplayFormat)); }
public string Format(SlickFormatterContext ctx) { return(Format(EnumTypeRegistry.Get(EnumKey), ctx.Value)); }
public string Format(SlickFormatterContext ctx) { return "<span class='freight-symbol'>" + Q.HtmlEncode(ctx.Value) + "</span>"; }
protected virtual string GetItemText(SlickFormatterContext ctx) { return(Q.HtmlEncode(ctx.Value)); }
public string Format(SlickFormatterContext ctx) { return("<span class=\"check-box no-float readonly " + (Q.IsTrue(ctx.Value) ? " checked" : "") + "\"></span>"); }
public string Format(SlickFormatterContext ctx) { return "<span class=\"check-box no-float readonly " + (Q.IsTrue(ctx.Value) ? " checked" : "") + "\"></span>"; }
public string Format(SlickFormatterContext ctx) { return Format(ctx.Value); }