Renders one label as a table row. Rows nested under a group header are indented; a standalone Label table renders flush.
| 354 | // Renders one label as a table row. Rows nested under a group header are |
| 355 | // indented; a standalone Label table renders flush. |
| 356 | std::string LabelRowHtml(const Label& l, bool indented) |
| 357 | { |
| 358 | std::ostringstream os; |
| 359 | os << "<tr>" |
| 360 | << "<td" << (indented ? " style='padding-left:16px'" : "") << ">" << l.GetValue() << "</td>" |
| 361 | << "<td>" << EscapeHtml(l.GetName()) << "</td>" |
| 362 | << "<td>" << LabelColorSwatch(l) << "</td>" |
| 363 | << "<td>" << (l.GetVisible() ? "True" : "False") << "</td>" |
| 364 | << "<td>" << (l.GetLocked() ? "True" : "False") << "</td>" |
| 365 | << "</tr>"; |
| 366 | return os.str(); |
| 367 | } |
| 368 | |
| 369 | std::string GroupHeaderRowHtml(const std::string& name, std::size_t index) |
| 370 | { |
no test coverage detected