shimatta-kenkyusho/shimatta_kenkyusho/templates/parts/stocks-detail.html

60 lines
3.0 KiB
HTML

{% extends 'base.html' %}
{% load qr_code %}
{% block content %}
<div class="container">
<nav aria-label="breadcrumb" class="fs-4">
<ol class="breadcrumb">
<li class="breadcrumb-item"></li>
{% for crumb in breadcrumbs %}
<li class="breadcrumb-item"><a href="{% url 'parts-stocks-detail' uuid=crumb.id %}">{{crumb.name}}</a></li>
{% endfor %}
<li class="breadcrumb-item active" aria-current="page">{{object.name}}</li>
</ol>
</nav>
<div class="row">
<div class="col-md">
{% qr_from_text object.get_qr_code size="m" image_format="svg" %}
</div>
<div class="col-md">
{% if object.parent_storage %}
<h1>Sub-Storages <a class="btn btn-secondary" href="{% url 'parts-stocks-detail' uuid=object.parent_storage.id %}">Parent Storage</a></h1>
{% else %}
<h1>Sub-Storages <a class="btn btn-secondary" href="{% url 'parts-stocks'%}">Stock Overview</a></h1>
{% endif %}
<div class="list-group">
{% for storage in storages %}
<a href="{% url 'parts-stocks-detail' uuid=storage.id %}" class="text-decoration-none">
<li class="list-group-item list-group-item-action justify-content-between align-items-center d-flex">
<div>
<h5>{{storage.name}}</h5>
Responsible: {{ storage.responsible }}
</div>
<span class="badge bg-primary rounded-pill">{{storage.get_total_stock_amount}}</span>
</li>
</a>
{% endfor %}
</div>
<nav aria-label="Storage Navigation">
<ul class="pagination">
{% if storages.number > 1 %}
<li class="page-item"><a class="page-link" href="?storage_page={{storages.previous_page_number}}">&laquo;</a></li>
<li class="page-item"><a class="page-link" href="?storage_page={{storages.previous_page_number}}">{{storages.previous_page_number}}</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link">&laquo;</span></li>
{% endif %}
<li class="page-item active"><span class="page-link">{{storages.number}}</span></li>
{% if storages.paginator.num_pages > storages.number %}
<li class="page-item"><a class="page-link" href="?storage_page={{storages.next_page_number}}">{{storages.next_page_number}}</a></li>
<li class="page-item"><a class="page-link" href="?storage_page={{storages.next_page_number}}">&raquo;</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
{% endif %}
</ul>
</nav>
</div>
</div>
</div>
{% endblock content %}