Sha256: 3fdb4b2557d4494bae1105b9e0663abaf8ec42ee3b671314f17d5f46bc91e2f7
Contents?: true
Size: 2 KB
Versions: 2
Compression:
Stored size: 2 KB
Contents
<div class="search"> <div class="column-block"> <% if @search_query.present? %> <h1>Showing search results for "<%= @search_query %>"</h1> <% else %> <h1>Showing all accounts</h1> <% end %> <table id="accounts-table" class="table table-condensed mobile-data"> <thead> <tr> <th>Name</th> <th>ID</th> <th>External key</th> <th>Balance</th> <th>City</th> <th>Country</th> </tr> </thead> <tbody> <tr> <td colspan="1" class="dataTables_empty">Loading data from server</td> </tr> </tbody> </table> </div> </div> <%= javascript_tag do %> $(document).ready(function() { var table = $('#accounts-table').DataTable({ "dom": "<'row'r>t<'row'<'col-md-6'i><'col-md-6'p>>", "pagingType": <% if @max_nb_records.nil? -%>"simple"<% else -%>"full_numbers"<% end -%>, "language": { <!-- See DefaultPaginationSqlDaoHelper.java --> "info": <% if @max_nb_records.nil? -%>"Showing _START_ to _END_ of <%= number_with_delimiter(Kaui::EngineControllerUtil::SIMPLE_PAGINATION_THRESHOLD) -%>+ entries"<% else -%>"Showing _START_ to _END_ of _TOTAL_ entries"<% end -%> }, "pageLength": <%= @limit %>, "displayStart": <%= @offset %>, <% unless @ordering.blank? %> "order": [[ 0, "<%= @ordering %>" ]], <% end %> "processing": true, "serverSide": true, "search": {"search": "<%= @search_query %>"}, "ajax": "<%= accounts_pagination_path(:ordering => @ordering, :format => :json) %>" }); <!-- When we don't know the total number of pages, we need to hide the legend and next button manually --> <% if @max_nb_records.nil? %> $('#accounts-table').on('draw.dt', function() { var noMoreData = table.column(0) .data() .length == 0; $(".next.paginate_button").toggleClass("disabled", noMoreData); $(".dataTables_info").toggle(!noMoreData); }); <% end %> }); <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kaui-0.15.5 | app/views/kaui/accounts/index.html.erb |
kaui-0.15.4 | app/views/kaui/accounts/index.html.erb |