Sha256: 1e90cfbc83c33683a4dcb4bb27e6fbab8167ae5284d695711214a5afb98da720
Contents?: true
Size: 1.97 KB
Versions: 22
Compression:
Stored size: 1.97 KB
Contents
<div class="search"> <div class="column-block"> <h1>Custom Fields <% if can? :add, Kaui::CustomField %> <%= link_to ' <i class="fa fa-plus-square"></i>'.html_safe, new_custom_field_path %> <% end %> </h1> <table id="custom_fields-table" class="table table-condensed mobile-data"> <thead> <tr> <th>Object ID</th> <th>Object type</th> <th>Name</th> <th>Value</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 = $('#custom_fields-table').DataTable({ "dom": "<'row'<'col-md-6'l><'col-md-6'f>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, "ajax": "<%= custom_fields_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? %> $('#custom_fields-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
22 entries across 22 versions & 1 rubygems