Only render grouped critical table header when needed
This commit is contained in:
@@ -72,24 +72,17 @@
|
|||||||
<div class="table-scroll">
|
<div class="table-scroll">
|
||||||
<table class="critical-table">
|
<table class="critical-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
@if (detail.Groups.Count > 0)
|
||||||
<th class="roll-band-header" rowspan="2"></th>
|
{
|
||||||
@if (detail.Groups.Count > 0)
|
<tr>
|
||||||
{
|
<th class="roll-band-header" rowspan="2"></th>
|
||||||
foreach (var group in detail.Groups)
|
@foreach (var group in detail.Groups)
|
||||||
{
|
{
|
||||||
<th colspan="@detail.Columns.Count">@group.Label</th>
|
<th colspan="@detail.Columns.Count">@group.Label</th>
|
||||||
}
|
}
|
||||||
}
|
</tr>
|
||||||
else
|
<tr>
|
||||||
{
|
@foreach (var group in detail.Groups)
|
||||||
<th colspan="@detail.Columns.Count"></th>
|
|
||||||
}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
@if (detail.Groups.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (var group in detail.Groups)
|
|
||||||
{
|
{
|
||||||
foreach (var column in detail.Columns)
|
foreach (var column in detail.Columns)
|
||||||
{
|
{
|
||||||
@@ -98,17 +91,20 @@
|
|||||||
</th>
|
</th>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
</tr>
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
foreach (var column in detail.Columns)
|
{
|
||||||
|
<tr>
|
||||||
|
<th class="roll-band-header"></th>
|
||||||
|
@foreach (var column in detail.Columns)
|
||||||
{
|
{
|
||||||
<th>
|
<th>
|
||||||
<span>@column.Label</span>
|
<span>@column.Label</span>
|
||||||
</th>
|
</th>
|
||||||
}
|
}
|
||||||
}
|
</tr>
|
||||||
</tr>
|
}
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var rollBand in detail.RollBands)
|
@foreach (var rollBand in detail.RollBands)
|
||||||
|
|||||||
Reference in New Issue
Block a user