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

fix templates

This commit is contained in:
Matthias
2022-05-02 22:41:24 +02:00
parent 8f3899ffe6
commit e7b189ba29
8 changed files with 35 additions and 7 deletions

View File

@@ -90,7 +90,11 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-industry'></span></td>
<td>{% trans "Manufacturer" %}</td>
<td><a href="{% url 'company-detail' part.manufacturer.id %}">{{ part.manufacturer.name }}</a>{% include "clip.html"%}</td>
<td>
{% if part.manufacturer %}
<a href="{% url 'company-detail' part.manufacturer.id %}">{{ part.manufacturer.name }}</a>{% include "clip.html"%}
{% endif %}
</td>
</tr>
<tr>
<td><span class='fas fa-hashtag'></span></td>
@@ -324,7 +328,9 @@ $('#delete-part').click(function() {
deleteManufacturerPart({{ part.pk }}, {
onSuccess: function() {
{% if part.manufacturer %}
window.location.href = "{% url 'company-detail' part.manufacturer.id %}";
{% endif %}
}
});
});

View File

@@ -85,7 +85,11 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-building'></span></td>
<td>{% trans "Supplier" %}</td>
<td><a href="{% url 'company-detail' part.supplier.id %}">{{ part.supplier.name }}</a>{% include "clip.html"%}</td></tr>
<td>{% if part.supplier %}
<a href="{% url 'company-detail' part.supplier.id %}">{{ part.supplier.name }}</a>{% include "clip.html"%}
{% endif %}
</td>
</tr>
<tr>
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "SKU" %}</td>
@@ -350,7 +354,9 @@ $('#delete-part').click(function() {
deleteSupplierPart({{ part.pk }}, {
onSuccess: function() {
{% if part.supplier %}
window.location.href = "{% url 'company-detail' part.supplier.id %}";
{% endif %}
}
});
});