mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #217 from SchrodingersGat/no-records-found
Improved table rendering
This commit is contained in:
commit
b6d6b648ef
@ -39,6 +39,7 @@
|
||||
$("#part-table").bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
formatNoMatches: function() { return "No supplier parts found for {{ company.name }}"; },
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
supplier: {{ company.id }}
|
||||
|
@ -31,6 +31,7 @@
|
||||
sortable: true,
|
||||
search: true,
|
||||
pagination: true,
|
||||
formatNoMatches: function() { return "No company information found"; },
|
||||
columns: [
|
||||
{
|
||||
field: 'pk',
|
||||
|
@ -40,6 +40,7 @@
|
||||
$("#supplier-table").bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
formatNoMatches: function() { return "No supplier parts available for {{ part.name }}"; },
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
part: {{ part.id }}
|
||||
|
@ -6,21 +6,9 @@
|
||||
|
||||
<h3>Used In</h3>
|
||||
|
||||
{% if part.used_in_count > 0 %}
|
||||
|
||||
<p>
|
||||
<b>{{ part.name }}</b> is used to make {{ part.used_in_count }} other parts.
|
||||
</p>
|
||||
|
||||
<table class="table table-striped table-condensed" id='used-table'>
|
||||
</table>
|
||||
|
||||
{% else %}
|
||||
<p>
|
||||
{{ part.name }} is not used to make any other parts.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
@ -29,6 +17,7 @@
|
||||
$("#used-table").bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
formatNoMatches: function() { return "{{ part.name }} is not used to make any other parts"; },
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
sub_part: {{ part.id }}
|
||||
|
@ -164,6 +164,7 @@ function loadBomTable(table, options) {
|
||||
table.bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
formatNoMatches: function() { return "No BOM items found"; },
|
||||
clickToSelect: true,
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
|
@ -27,6 +27,7 @@
|
||||
sortable: true,
|
||||
search: true,
|
||||
pagination: true,
|
||||
formatNoMatches: function() { return "No parts found matching search query"; },
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
search: "{{ query }}",
|
||||
|
Loading…
Reference in New Issue
Block a user