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