Merge pull request #217 from SchrodingersGat/no-records-found

Improved table rendering
This commit is contained in:
Oliver 2019-05-04 00:21:36 +10:00 committed by GitHub
commit b6d6b648ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 12 deletions

View File

@ -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 }}

View File

@ -31,6 +31,7 @@
sortable: true,
search: true,
pagination: true,
formatNoMatches: function() { return "No company information found"; },
columns: [
{
field: 'pk',

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 {

View File

@ -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 }}",