Add package overview, search, and create modal

This commit is contained in:
2021-11-14 18:40:21 +01:00
parent 503ede44e3
commit 3bbc05db1e
6 changed files with 139 additions and 36 deletions

View File

@@ -33,32 +33,6 @@
</div>
{% include 'paginator.html' with paginator=components get_param='comp_page' aria_label='Component Page Navigation' %}
</div>
<div class="col-md">
<h2>Packages</h2>
{% for pkg in packages %}
<a href="{% url 'parts-packages-detail' uuid=pkg.id %}" class="text-decoration-none">
<li class="list-group-item list-group-item-action d-flex align-items-center">
<div class="flex-shrink-0">
{% if pkg.image %}
<img src="{{pkg.image.url}}" class="component-img-small" alt="{{ pkg.name }}" class="mr-3">
{% else %}
{% load static %}
<img src="{% static 'css/icons/card-image.svg' %}" class="component-img-def-small" alt="{{ pkg.name }}" class="mr-3">
{% endif %}
</div>
<div class="flex-grow-1 ms-3">
<h6 class="mt-0 text-primary">{{ pkg.name }}</h6>
{% if pkg.smd %}
SMD Package<br>
{% endif %}
Pin Count: {{pkg.pin_count}}
</div>
</li>
</a>
{% endfor %}
</div>
{% include 'paginator.html' with paginator=packages get_param='pkg_page' aria_label='Package Page Navigation' %}
</div>
</div>
</div>
{% endblock content %}