2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

template tag for translatable alerts with links

This commit is contained in:
2021-04-17 23:48:47 +02:00
parent 7a0a901c2b
commit 20af4c9ba0
4 changed files with 23 additions and 5 deletions

View File

@@ -14,7 +14,8 @@
{% if part.variant_of %}
<div class='alert alert-info alert-block'>
{% trans "This part is a variant of" %} <strong><a href="{% url 'part-variants' part.variant_of.id %}">{{ part.variant_of.full_name }}</a></strong>
{% object_link 'part-variants' part.variant_of.id part.variant_of.full_name as link %}
{% blocktrans %}This part is a variant of {{ link }}{% endblocktrans %}
</div>
{% endif %}