fix: Produce correct HTML for the meeting requests table (#5712)
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
This commit is contained in:
parent
32b90b99bc
commit
fbe876b758
|
@ -18,63 +18,97 @@
|
|||
|
||||
<h2 class="mt-3">Requests Summary</h2>
|
||||
<p class="mt-2"><em>This summary section focuses on sessions that have conflict lists to manage. It excludes requests from groups of type "team", such as those for the hackathon or for tutorials.</em></p>
|
||||
<div class="mt-2">
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
{% for row in summary_by_area %}
|
||||
<tr>
|
||||
{% if forloop.first %}
|
||||
{% for col in row %}
|
||||
<th scope="col" class="table-primary">{{ col }}</th>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for col in row %}
|
||||
<td>{{ col }}</td>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<div class="mt-3">
|
||||
<table class="table table-sm table-striped">
|
||||
{% for row in summary_by_area %}
|
||||
{% if forloop.first %}
|
||||
<thead>
|
||||
<tr class="table-info">
|
||||
{% for col in row %}
|
||||
<th scope="col"{% if not forloop.first %} class="text-end"{% endif %}>{{ col }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% elif forloop.last %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
{% for col in row %}
|
||||
<th scope="col"{% if not forloop.first %} class="text-end"{% endif %}>{{ col }}</th>
|
||||
{% endfor %}
|
||||
{# last line is missing two columns? #}
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
{% else %}
|
||||
<tr>
|
||||
{% for col in row %}
|
||||
{% if forloop.first %}
|
||||
<th scope="row">{{ col }}</th>
|
||||
{% else %}
|
||||
<td class="text-end">{{ col }}</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="row mt-3">
|
||||
<div class="col">
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
{% for row in summary_by_group_type %}
|
||||
<tr>
|
||||
{% if forloop.first %}
|
||||
<table class="table table-sm table-striped">
|
||||
{% for row in summary_by_group_type %}
|
||||
{% if forloop.first %}
|
||||
<thead>
|
||||
<tr class="table-info">
|
||||
{% for col in row %}
|
||||
<th scope="col"{% if not forloop.first %} class="text-end"{% endif %}>{{ col }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% else %}
|
||||
<tr>
|
||||
{% for col in row %}
|
||||
<th scope="col" class="table-primary">{{ col }}</th>
|
||||
{% if forloop.first %}
|
||||
<th scope="row">{{ col }}</th>
|
||||
{% else %}
|
||||
<td class="text-end">{{ col }}</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for col in row %}
|
||||
<td>{{ col }}</td>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col">
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
{% for row in summary_by_purpose %}
|
||||
<tr>
|
||||
{% if forloop.first %}
|
||||
<table class="table table-sm table-striped">
|
||||
{% for row in summary_by_purpose %}
|
||||
{% if forloop.first %}
|
||||
<thead>
|
||||
<tr class="table-info">
|
||||
{% for col in row %}
|
||||
<th scope="col"{% if not forloop.first %} class="text-end"{% endif %}>{{ col }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% else %}
|
||||
<tr>
|
||||
{% for col in row %}
|
||||
<th scope="col" class="table-primary">{{ col }}</th>
|
||||
{% if forloop.first %}
|
||||
<th scope="row">{{ col }}</th>
|
||||
{% else %}
|
||||
<td class="text-end">{{ col }}</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for col in row %}
|
||||
<td>{{ col }}</td>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue