internal static List <object> htmlStrings(bool hasSelect, Args a, params IHtmlContent[] values) { var list = new List <object>(); foreach (var value in values) { addValue(list, value); } list.Add(new HtmlString("<td>")); if (hasSelect) { list.Add(new HtmlString(Href.Compose(a, Actions.Index, Captions.Select))); list.Add(" | "); } list.Add(new HtmlString(Href.Compose(a, Actions.Edit, Captions.Edit))); list.Add(" | "); list.Add(new HtmlString(Href.Compose(a, Actions.Details, Captions.Details))); list.Add(" | "); list.Add(new HtmlString(Href.Compose(a, Actions.Delete, Captions.Delete))); list.Add(new HtmlString("</td>")); return(list); }
private static void addButton(List <Object> list, Args a, string action, string caption, ref bool hasButton) { if (hasButton) { list.Add(" | "); } list.Add(new HtmlString(Href.Compose(a, action, caption))); hasButton = true; }
internal static List <object> htmlStrings(Args a) { a.PageUrl = new Uri($"./{getPageUrl(a.PageUrl)}", UriKind.Relative); a.Handler = getHandler(a.Handler); a.Action = null; a.ItemId = null; a.Title = getTitle(a.Title); a.ControlId = "backToList"; var s = Href.Compose(a); return(new List <object> { new HtmlString(s) }); }