app/views/kaui/invoices/index.html.erb in kaui-2.0.4 vs app/views/kaui/invoices/index.html.erb in kaui-2.1.0

- old
+ new

@@ -6,13 +6,13 @@ <table id="invoices-table" class="table table-condensed mobile-data"> <thead> <tr> <th>Number</th> - <th>Date</th> - <th>Amount</th> - <th>Balance</th> + <% (@account.account_id.blank? ? Kaui.invoice_search_columns : Kaui.account_invoices_columns).call()[0].each do |title| %> + <th><%= title %></th> + <% end %> </tr> </thead> <tbody> <tr> <td colspan="1" class="dataTables_empty">Loading data from server</td> @@ -41,10 +41,12 @@ // No paging for per-account listings "dom": "t", "paging": false, "ajax": "<%= invoices_pagination_path :format => :json %>", <% end %> - <% unless @ordering.blank? %> + <% if @search_query.blank? %> + "ordering": false, + <% elsif !@ordering.blank? %> "order": [[ 0, "<%= @ordering %>" ]], <% end %> "processing": true, "serverSide": true, "search": {"search": "<%= @search_query %>"},