Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show "no records found" when a list is empty. #3365

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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