2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 12:10:59 +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
InvenTree
build
templates
part
templates
templatetags
stock
templates

@ -3,6 +3,7 @@
{% load static %}
{% load i18n %}
{% load status_codes %}
{% load inventree_extras %}
{% block page_title %}
InvenTree | {% trans "Build Order" %} - {{ build }}
@ -11,12 +12,14 @@ InvenTree | {% trans "Build Order" %} - {{ build }}
{% block pre_content %}
{% if build.sales_order %}
<div class='alert alert-block alert-info'>
{% trans "This Build Order is allocated to Sales Order" %} <b><a href="{% url 'so-detail' build.sales_order.id %}">{{ build.sales_order }}</a></b>
{% object_link 'so-detail' build.sales_order.id build.sales_order as link %}
{% blocktrans %}This Build Order is allocated to Sales Order {{ link }}{% endblocktrans %}
</div>
{% endif %}
{% if build.parent %}
<div class='alert alert-block alert-info'>
{% trans "This Build Order is a child of Build Order" %} <b><a href="{% url 'build-detail' build.parent.id %}">{{ build.parent }}</a></b>
{% object_link 'build-detail' build.parent.id build.parent as link %}
{% blocktrans %}This Build Order is a child of Build Order {{ link }}{% endblocktrans %}
</div>
{% endif %}
{% endblock %}