2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Display part images in build allocation list

(CSS needs some work)
This commit is contained in:
Oliver Walters
2019-05-07 23:28:46 +10:00
parent 7101d9cb7e
commit 29b94c91f3
2 changed files with 23 additions and 2 deletions

View File

@ -1,10 +1,23 @@
{% extends "collapse.html" %}
{% load static %}
{% load inventree_extras %}
{% block collapse_title %}
{{ item.sub_part.name }}<br>
<small><i>{{ item.sub_part.description }}</i></small>
<div>
<div class='media-left'>
<img class='part-thumb' style='height: auto; width: 48px;'
{% if item.sub_part.image %}
src="{{ item.sub_part.image.url }}" alt='{{ item.sub_part.name }}'>
{% else %}
src="{% static 'img/blank_image.png' %}" alt='No image'>
{% endif %}
</div>
<div class='media-body'>
{{ item.sub_part.name }}<br>
<small><i>{{ item.sub_part.description }}</i></small>
</div>
</div>
{% endblock %}
{% block collapse_heading %}