Skip to content

Commit

Permalink
Merge pull request #3365 from matthewfu/show-new-records-found-on-list
Browse files Browse the repository at this point in the history
Show "no records found" when a list is empty.
  • Loading branch information
mshibuya authored Oct 4, 2021
2 parents f67defb + 1fecb4a commit 537fe41
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/views/rails_admin/main/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
other_left = ((params[:set].to_i - 1) >= 0) && sets[params[:set].to_i - 1].present?
other_right = sets[params[:set].to_i + 1].present?
end
table_table_header_count = begin
count = checkboxes ? 1 : 0
count = count + properties.count
end

- content_for :contextual_tabs do
- if checkboxes
Expand Down Expand Up @@ -109,7 +113,9 @@
- unless frozen_columns
%td.last.links
%ul.inline.list-inline= menu_for :member, @abstract_model, object, true

- if @objects.empty?
%tr{class: "empty_row"}
%td{:colspan => table_table_header_count, :style=>"text-align: center;"} No Records found
- if @model_config.list.limited_pagination
.row
.col-md-6= paginate(@objects, theme: 'ra-twitter-bootstrap/without_count', total_pages: Float::INFINITY, remote: true)
Expand Down

0 comments on commit 537fe41

Please sign in to comment.