Property editor for a table with editable rows/columns and toggleable cells.
The NuGet package installs a single assembly Our.Umbraco.CheckboxTable.dll which has a dependency on Umbraco Embedded Resource.
@{
// model (as would be set)
Our.Umbraco.CheckboxTable.Models.CheckboxTable checkboxTable;
}
<table>
<tr>
<th></th> <!-- irrelevant cell -->
@foreach (var columnLabel in checkboxTable.ColumnLabels)
{
<th>@columnLabel</th>
}
</tr>
@foreach (var row in checkboxTable.Rows)
{
<tr>
<td>@row.RowLabel</td>
@foreach (var cell in row.Cells)
{
<td>@(cell ? "X" : "")</td>
}
</tr>
}
</table>