mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
More tweaks
This commit is contained in:
parent
c4c533bee0
commit
a689b77cfb
@ -24,16 +24,6 @@
|
||||
|
||||
<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'>
|
||||
@ -41,13 +31,6 @@
|
||||
<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>
|
||||
|
@ -346,6 +346,32 @@
|
||||
<h4>{% trans "Bill of Materials" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
<!-- 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>
|
||||
<!-- Actions 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 %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if roles.part.change %}
|
||||
<button class='btn btn-success' type='button' title='{% trans "New BOM Item" %}' id='bom-item-new'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add BOM Item" %}
|
||||
|
@ -60,23 +60,28 @@
|
||||
|
||||
<div class='panel panel-hidden' id='panel-test-data'>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Test Data" %}</h4>
|
||||
<div class='d-flex flex-row'>
|
||||
<h4>{% trans "Test Data" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
<button type='button' class='btn btn-outline-secondary' id='test-report'>
|
||||
<span class='fas fa-file-pdf'></span> {% trans "Test Report" %}
|
||||
</button>
|
||||
{% if user.is_staff %}
|
||||
<button type='button' class='btn btn-danger' id='delete-test-results'>
|
||||
<span class='fas fa-trash-alt'></span> {% trans "Delete Test Data" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
<button type='button' class='btn btn-success' id='add-test-result'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add Test Data" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<div id='test-button-toolbar'>
|
||||
<div class='button-toolbar container-fluid' style="float: right;">
|
||||
<div class='btn-group' role='group'>
|
||||
{% if user.is_staff %}
|
||||
<button type='button' class='btn btn-danger' id='delete-test-results'>
|
||||
<span class='fas fa-trash-alt'></span> {% trans "Delete Test Data" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
<button type='button' class='btn btn-success' id='add-test-result'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add Test Data" %}
|
||||
</button>
|
||||
<button type='button' class='btn btn-outline-secondary' id='test-report'>
|
||||
<span class='fas fa-tasks'></span> {% trans "Test Report" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class='filter-list' id='filter-list-stocktests'>
|
||||
<!-- Empty div -->
|
||||
@ -128,13 +133,18 @@
|
||||
|
||||
<div class='panel panel-hidden' id='panel-installed-items'>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Installed Stock Items" %}</h4>
|
||||
<div class='d-flex flex-row'>
|
||||
<h4>{% trans "Installed Stock Items" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
<button type='button' class='btn btn-success' id='stock-item-install'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Install Stock Item" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-success' id='stock-item-install'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Install Stock Item" %}
|
||||
</button>
|
||||
</div>
|
||||
<table class='table table-striped table-condensed' id='installed-table'></table>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ function loadAttachmentTable(url, options) {
|
||||
return '{% trans "No attachments found" %}';
|
||||
},
|
||||
sortable: true,
|
||||
search: false,
|
||||
search: true,
|
||||
queryParams: options.filters || {},
|
||||
onPostBody: function() {
|
||||
// Add callback for 'edit' button
|
||||
@ -58,12 +58,16 @@ function loadAttachmentTable(url, options) {
|
||||
|
||||
var fn = value.toLowerCase();
|
||||
|
||||
if (fn.endsWith('.pdf')) {
|
||||
if (fn.endsWith('.csv')) {
|
||||
icon = 'fa-file-csv';
|
||||
} else if (fn.endsWith('.pdf')) {
|
||||
icon = 'fa-file-pdf';
|
||||
} else if (fn.endsWith('.xls') || fn.endsWith('.xlsx')) {
|
||||
icon = 'fa-file-excel';
|
||||
} else if (fn.endsWith('.doc') || fn.endsWith('.docx')) {
|
||||
icon = 'fa-file-word';
|
||||
} else if (fn.endsWith('.zip') || fn.endsWith('.7z')) {
|
||||
icon = 'fa-file-archive';
|
||||
} else {
|
||||
var images = ['.png', '.jpg', '.bmp', '.gif', '.svg', '.tif'];
|
||||
|
||||
|
@ -453,14 +453,14 @@ function removeStockRow(e) {
|
||||
function passFailBadge(result) {
|
||||
|
||||
if (result) {
|
||||
return `<span class='badge rounded-pill bg-success'>{% trans "PASS" %}</span>`;
|
||||
return `<span class='badge badge-right rounded-pill bg-success'>{% trans "PASS" %}</span>`;
|
||||
} else {
|
||||
return `<span class='badge rounded-pill bg-danger'>{% trans "FAIL" %}</span>`;
|
||||
return `<span class='badge badge-right rounded-pill bg-danger'>{% trans "FAIL" %}</span>`;
|
||||
}
|
||||
}
|
||||
|
||||
function noResultBadge() {
|
||||
return `<span class='badge rounded-pill bg-info'>{% trans "NO RESULT" %}</span>`;
|
||||
return `<span class='badge badge-right rounded-pill bg-info'>{% trans "NO RESULT" %}</span>`;
|
||||
}
|
||||
|
||||
function formatDate(row) {
|
||||
|
Loading…
Reference in New Issue
Block a user