mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-31 00:51:33 +00:00
64 lines
3.2 KiB
HTML
64 lines
3.2 KiB
HTML
{% load i18n %}
|
|
{% load inventree_extras %}
|
|
|
|
{% if not roles.part.change %}
|
|
<div class='alert alert-danger alert-block'>
|
|
{% trans "You do not have permission to edit the BOM." %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if part.bom_checked_date %}
|
|
{% if part.is_bom_valid %}
|
|
<div class='alert alert-block alert-info'>
|
|
{% else %}
|
|
<div class='alert alert-block alert-danger'>
|
|
{% blocktrans with part=part.full_name %}The BOM for <em>{{ part }}</em> has changed, and must be validated.<br>{% endblocktrans %}
|
|
{% endif %}
|
|
{% blocktrans with part=part.full_name checker=part.bom_checked_by check_date=part.bom_checked_date %}The BOM for <em>{{ part }}</em> was last checked by {{ checker }} on {{ check_date }}{% endblocktrans %}
|
|
</div>
|
|
{% else %}
|
|
<div class='alert alert-danger alert-block'>
|
|
<strong>{% blocktrans with part=part.full_name %}The BOM for <em>{{ part }}</em> has not been validated.{% endblocktrans %}</strong>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div id='bom-button-toolbar'>
|
|
<div class="btn-group" role="group" aria-label="...">
|
|
<!-- Export menu -->
|
|
<div class='btn-group'>
|
|
<button id='export-options' title='{% trans "Export actions" %}' class='btn btn-outline-secondary dropdown-toggle' type='button' data-bs-toggle='dropdown'>
|
|
<span class='fas fa-download'></span> <span class='caret'></span>
|
|
</button>
|
|
<ul class='dropdown-menu' role='menu'>
|
|
<li><a class='dropdown-item' href='#' id='download-bom'><span class='fas fa-file-download'></span> {% trans "Export BOM" %}</a></li>
|
|
<li><a class='dropdown-item' href='#' id='print-bom-report'><span class='fas fa-file-pdf'></span> {% trans "Print BOM Report" %}</a></li>
|
|
</ul>
|
|
</div>
|
|
{% if roles.part.change %}
|
|
<!-- Action menu -->
|
|
<div class='btn-group'>
|
|
<button id='bom-actions' title='{% trans "BOM actions" %}' class='btn btn-outline-secondary dropdown-toggle' type='button' data-bs-toggle='dropdown'>
|
|
<span class='fas fa-wrench'></span> <span class='caret'></span>
|
|
</button>
|
|
<ul class='dropdown-menu' role='menu'>
|
|
<li><a class='dropdown-item' href='#' id='bom-upload'><span class='fas fa-file-upload'></span> {% trans "Upload BOM" %}</a></li>
|
|
{% if part.variant_of %}
|
|
<li><a class='dropdown-item' href='#' id='bom-duplicate'><span class='fas fa-clone'></span> {% trans "Copy BOM" %}</a></li>
|
|
{% endif %}
|
|
{% if not part.is_bom_valid %}
|
|
<li><a class='dropdown-item' href='#' id='validate-bom'><span class='fas fa-clipboard-check icon-green'></span> {% trans "Validate BOM" %}</a></li>
|
|
{% endif %}
|
|
<li><a class='dropdown-item' href='#' id='bom-item-delete'><span class='fas fa-trash-alt icon-red'></span> {% trans "Delete Items" %}</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class='filter-list' id='filter-list-bom'>
|
|
<!-- Empty div (will be filled out with avilable BOM filters) -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<table class='table table-bom table-condensed' data-toolbar="#bom-button-toolbar" id='bom-table'>
|
|
</table>
|