Revert stock-item detail template to mater

This commit is contained in:
Oliver 2021-11-02 19:43:17 +11:00
parent c3c4aca829
commit d357e982f5

View File

@ -22,13 +22,6 @@
{% url 'admin:stock_stockitem_change' item.pk as url %} {% url 'admin:stock_stockitem_change' item.pk as url %}
{% include "admin_button.html" with url=url %} {% include "admin_button.html" with url=url %}
{% endif %} {% endif %}
<div class='btn-group' role='group'>
</div>
<div class='btn-group' role='group'>
{% if barcodes %} {% if barcodes %}
<!-- Barcode actions menu --> <!-- Barcode actions menu -->
<div class='btn-group' role='group'> <div class='btn-group' role='group'>
@ -62,7 +55,7 @@
<!-- Check permissions and owner --> <!-- Check permissions and owner -->
{% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser %} {% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser %}
{% if roles.stock.change and not item.is_building %} {% if roles.stock.change and not item.is_building %}
<div class='btn-group' role='group'> <div class='btn-group'>
<button id='stock-actions' title='{% trans "Stock adjustment actions" %}' class='btn btn-outline-secondary dropdown-toggle' type='button' data-bs-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button> <button id='stock-actions' title='{% trans "Stock adjustment actions" %}' class='btn btn-outline-secondary dropdown-toggle' type='button' data-bs-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button>
<ul class='dropdown-menu' role='menu'> <ul class='dropdown-menu' role='menu'>
{% if not item.serialized %} {% if not item.serialized %}
@ -110,7 +103,6 @@
<li><a class='dropdown-item' href='#' id='stock-duplicate' title='{% trans "Duplicate stock item" %}'><span class='fas fa-copy'></span> {% trans "Duplicate stock item" %}</a></li> <li><a class='dropdown-item' href='#' id='stock-duplicate' title='{% trans "Duplicate stock item" %}'><span class='fas fa-copy'></span> {% trans "Duplicate stock item" %}</a></li>
{% endif %} {% endif %}
<li><a class='dropdown-item' href='#' id='stock-edit' title='{% trans "Edit stock item" %}'><span class='fas fa-edit icon-blue'></span> {% trans "Edit stock item" %}</a></li> <li><a class='dropdown-item' href='#' id='stock-edit' title='{% trans "Edit stock item" %}'><span class='fas fa-edit icon-blue'></span> {% trans "Edit stock item" %}</a></li>
<li><a class='dropdown-item' href='#' id='stock-edit-2' title='{% trans "Edit stock item" %}'><span class='fas fa-edit icon-blue'></span> {% trans "Edit stock item" %}</a></li>
{% if user.is_staff or roles.stock.delete %} {% if user.is_staff or roles.stock.delete %}
{% if item.can_delete %} {% if item.can_delete %}
<li><a class='dropdown-item' href='#' id='stock-delete' title='{% trans "Delete stock item" %}'><span class='fas fa-trash-alt icon-red'></span> {% trans "Delete stock item" %}</a></li> <li><a class='dropdown-item' href='#' id='stock-delete' title='{% trans "Delete stock item" %}'><span class='fas fa-trash-alt icon-red'></span> {% trans "Delete stock item" %}</a></li>
@ -120,8 +112,6 @@
</div> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}
{% block thumbnail %} {% block thumbnail %}
@ -491,10 +481,6 @@ $("#stock-edit").click(function () {
); );
}); });
$('#stock-edit-2').click(function() {
editStockItem({{ item.pk }});
});
$('#stock-edit-status').click(function () { $('#stock-edit-status').click(function () {
constructForm('{% url "api-stock-detail" item.pk %}', { constructForm('{% url "api-stock-detail" item.pk %}', {