Пример #1
0
            static string toPopupHtml(NeedM s, bool isLoggedIn)
            {
                StringBuilder sb = new StringBuilder();

                sb.Append("<div class='need_met'>");
                sb.Append("<h1>Met Needs</h1>");
                sb.Append(s.TwitterHtml);
                if (isLoggedIn)
                {
                    sb.Append($"<a class='edit_link' target='_blank' title='View Record' href='/edit-needs/{s.Id}'><i class='fas fa-link fa-2x'></i></a>");
                }
                sb.Append(HtmlHelp.LabelledTag("Postcode:", s.Postcode));
                sb.Append(HtmlHelp.LabelledTag("Organisation:", s.Organisation));
                sb.Append(HtmlHelp.LabelledList("Needs Met:", s.PpeTypes));
                sb.Append(HtmlHelp.LabelledTag("Other Needs Met:", s.OtherPpeTypes));
                sb.Append(s.PostedHtml);
                sb.Append("</div>");
                return(sb.ToString());
            }
Пример #2
0
            static string toPopupHtml(SupplyM s, bool isLoggedIn)
            {
                StringBuilder sb = new StringBuilder();

                sb.Append("<div class='supply'>");
                sb.Append("<h1>Supplies Post</h1>");
                sb.Append(s.WebsiteHtml);
                if (isLoggedIn)
                {
                    sb.Append($"<a class='edit_link' target='_blank' title='View Record' href='/edit-supplies/{s.Id}'><i class='fas fa-link fa-2x'></i></a>");
                }
                sb.Append(HtmlHelp.LabelledTag("Organisation:", s.Organisation));
                sb.Append(HtmlHelp.LabelledTag("Description:", s.Description));
                sb.Append(HtmlHelp.LabelledList("Supplies:", s.PpeTypes));
                sb.Append(HtmlHelp.LabelledTag("Other Supplies:", s.OtherPpeTypes));
                sb.Append(HtmlHelp.LabelledTag("Capacity:", s.CapacityNotes));                 //TODO:TD switch to compiled info from ppetTypes for new posts
                //TODO:contact details
                sb.Append(s.PostedHtml);
                sb.Append("</div>");
                return(sb.ToString());
            }