protected override async Task RenderBody(IResponseContext rsp) { rsp.Write("<div class=\"container body-content\">"); rsp.Write("<div class=\"clearfix\"></div>"); _logger.Info($"Listing users {rsp.Page}, {rsp.Size}"); var page = await _gbProvider.GetUsers(rsp.Page, rsp.Size).ConfigureAwait(false); if (!page.Items.Any()) { rsp.Write("<p>No users found</p>"); } else { foreach (var u in page.Items) { rsp.Write($"<hr/><div class=\"row\" data-id=\"{HtmlResponse.HtmlEncode(u.UserLogin)}\">"); rsp.Write($"<div class=\"col-md-1\"><b>{u.UserLogin}</b></div>"); rsp.Write($"<div class=\"col-md-4\">{HtmlResponse.HtmlEncode(u.DisplayName)}</div>"); rsp.Write("</div>"); } } rsp.Write("<div>"); }
protected override async Task RenderBody(IResponseContext rsp) { rsp.Write("<div class=\"container body-content\">"); rsp.Write("<div class=\"clearfix\"></div>"); var page = await _gbProvider.GetUsers(1, -1).ConfigureAwait(false); _logger.Info("Returning all the Gusrst Book"); if (!page.Items.Any()) { rsp.Write("<p>No users found</p>"); } else { foreach (var u in page.Items) { rsp.Write($"<hr/><div class=\"row\" data-id=\"{HtmlResponse.HtmlEncode(u.UserLogin)}\">"); rsp.Write($"<div class=\"col-md-1\"><b>{u.UserLogin}</b></div>"); rsp.Write($"<div class=\"col-md-4\">{HtmlResponse.HtmlEncode(u.DisplayName)}</div>"); rsp.Write("</div>"); var msgPage = await _gbProvider.GetUserMessages(u.UserLogin, 1, -1).ConfigureAwait(false); foreach (var m in msgPage.Items) { rsp.Write("<div class=\"row\">"); rsp.Write("<div class=\"col-md-1\"> </div>"); rsp.Write($"<div class=\"col-md-2\"><b>{m.Created.ToString("G")}</b></div>"); rsp.Write("</div>"); rsp.Write("<div class=\"row\">"); rsp.Write($"<div class=\"col-md-12\">{HtmlResponse.HtmlEncode(m.Text)}</div>"); rsp.Write("</div>"); } rsp.Write("<div class=\"clearfix\"></div>"); } } rsp.Write("<div>"); }