Skip to content

Commit

Permalink
Preview number of variants in view all link
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeluigi committed Feb 13, 2023
1 parent 8959093 commit 2d7a23c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,17 @@
</td>
</tr>
{% endfor %}
{% if original.variants_for_editors.count > suggested_count %}
{% with variants_count=original.variants_for_editors.count %}
{% if variants_count > suggested_count %}
<tr class="form-row">
<td class="field-variant">
<p>
<a href="{% url 'admin:spellbook_variant_changelist' %}?of__id={{ original.id }}">View more variants of this combo...</a>
<a href="{% url 'admin:spellbook_variant_changelist' %}?of__id={{ original.id }}">View all {{ variants_count }} variants of this combo...</a>
</p>
</td>
</tr>
{% endif %}
{% endwith %}
</tbody>
</table>
{% endblock %}

0 comments on commit 2d7a23c

Please sign in to comment.