added a conditional to limit only 5 rows to display

This commit is contained in:
Beverly Nguyen
2024-03-15 10:33:39 -07:00
parent a05e09d345
commit bc71549d12

View File

@@ -57,35 +57,37 @@
</thead>
<tbody>
{% for item in recipients.displayed_rows %}
<tr class="table-row">
{% for column in recipients.column_headers %}
<td class="table-field-left-aligned">
<div>
{% set column_data = item[column].data or '' %}
{% if column_data is iterable and column_data is not string %}
<ul>
{% for data_item in column_data %}
{% if data_item is not none %}
<li>{{ data_item }}</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
{{ column_data }}
{% endif %}
</div>
</td>
{% endfor %}
{% if item[None].data %}
{% for column in item[None].data %}
<td class="table-field-left-aligned">
<div class="">
{{ column }}
</div>
</td>
{% endfor %}
{% if loop.index <= 5 %}
<tr class="table-row">
{% for column in recipients.column_headers %}
<td class="table-field-left-aligned">
<div>
{% set column_data = item[column].data or '' %}
{% if column_data is iterable and column_data is not string %}
<ul>
{% for data_item in column_data %}
{% if data_item is not none %}
<li>{{ data_item }}</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
{{ column_data }}
{% endif %}
</div>
</td>
{% endfor %}
{% if item[None].data %}
{% for column in item[None].data %}
<td class="table-field-left-aligned">
<div class="">
{{ column }}
</div>
</td>
{% endfor %}
{% endif %}
</tr>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>