Closes #13412: Enable pagination of custom field choice set choices

This commit is contained in:
Jeremy Stretch
2023-08-16 11:08:36 -04:00
parent 0bdb3e23ea
commit 4335abe956
2 changed files with 23 additions and 6 deletions

View File

@@ -55,18 +55,14 @@
<th>Label</th>
</tr>
</thead>
{% for value, label in object.choices|slice:":50" %}
{% for value, label in choices %}
<tr>
<td>{{ value }}</td>
<td>{{ label }}</td>
</tr>
{% endfor %}
{% if object.choices|length > 50 %}
<tr>
<td colspan="2" class="text-muted">(Additional choices not displayed)</td>
</tr>
{% endif %}
</table>
{% include 'inc/paginator.html' with page=choices %}
</div>
</div>
{% plugin_right_page object %}