Hide some options if a part is not active

This commit is contained in:
Oliver Walters 2019-04-28 23:10:34 +10:00
parent 260d890052
commit 495d414d54
3 changed files with 10 additions and 1 deletions

View File

@ -7,7 +7,9 @@
<h3>Part Builds</h3>
<div id='button-toolbar'>
{% if part.active %}
<button class="btn btn-success" id='start-build'>Start New Build</button>
{% endif %}
</div>
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='build-table'>

View File

@ -17,7 +17,12 @@
<li><a href='#' id='duplicate-part' title='Duplicate Part'>Duplicate</a></li>
<li><a href="#" id='edit-part' title='Edit part'>Edit</a></li>
<li><a href='#' id='stocktake-part' title='Stocktake'>Stocktake</a></li>
<li><a href="#" id='delete-part' title='Delete part'>Delete</a></li>
<hr>
{% if part.active %}
<li><a href="#" id='deactivate-part' title='Deactivate part'>Deactivate</a></li>
{% else %}
<li><a href="#" id='activate-part' title='Activate part'>Activate</a></li>
{% endif %}
</ul>
</div>
</h3>

View File

@ -7,7 +7,9 @@
<h3>Part Stock</h3>
<div id='button-toolbar'>
{% if part.active %}
<button class='btn btn-success' id='add-stock-item'>New Stock Item</button>
{% endif %}
<div id='opt-dropdown' class="dropdown" style='float: right;'>
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
<span class="caret"></span></button>