2021-08-07 17:37:36 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-11-09 16:35:11 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md">
|
|
|
|
<h2>Components</h2>
|
|
|
|
<div class="list-group">
|
|
|
|
{% for comp in components %}
|
|
|
|
<a href="{% url 'parts-components-detail' uuid=comp.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 comp.get_resolved_image %}
|
|
|
|
<img src="{{comp.get_resolved_image}}" style="max-width:64px;max-height:64px;" alt="{{ comp.name }}" class="mr-3">
|
|
|
|
{% else %}
|
|
|
|
{% load static %}
|
|
|
|
<img src="{% static 'css/icons/card-image.svg' %}" style="width:64px;max-height:64px;" alt="{{ comp.name }}" class="mr-3">
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="flex-grow-1 ms-3">
|
|
|
|
<h6 class="mt-0 text-primary">{{ comp.name }}</h6>
|
|
|
|
{% if comp.package %}
|
|
|
|
Package: {{comp.package}}<br>
|
|
|
|
{% endif %}
|
|
|
|
{% if comp.manufacturer %}
|
|
|
|
Manufacturer: {{comp.manufacturer}}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<span class="badge bg-primary rounded-pill">{{comp.get_total_amount}}</span>
|
|
|
|
</li>
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</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 %}
|
|
|
|
<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}}" style="max-width:64px;max-height:64px;" alt="{{ pkg.name }}" class="mr-3">
|
|
|
|
{% else %}
|
|
|
|
{% load static %}
|
|
|
|
<img src="{% static 'css/icons/card-image.svg' %}" style="width:64px;max-height:64px;" 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>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% include 'paginator.html' with paginator=packages get_param='pkg_page' aria_label='Package Page Navigation' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-08-07 17:37:36 +02:00
|
|
|
{% endblock content %}
|