Skip to content

Commit

Permalink
Merge pull request #22807 from GilbertCherrie/fix_dashboard_accessibi…
Browse files Browse the repository at this point in the history
…lity_issues

Fix dashboard accessibility issues

(cherry picked from commit 999306b)
  • Loading branch information
Fryguy committed Dec 14, 2023
1 parent 51c824e commit 9501a11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/miq_widget/report_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ def generate(user_or_group)
end
end

empty_row = "<tr><td>#{_("No records found")}</td>#{"<td></td>" * (headers.length - 1)}</tr>"

rows = "<table class='table table-striped table-bordered table-hover'><thead><tr>"
headers.each { |h| rows << "<th>#{h}</th>" }
rows << "</tr></thead><tbody>"
rows << (body.blank? ? "<tr><td colspan='5'>" + _("No records found") + "</td></tr>" : body)
rows << (body.presence || empty_row)
rows << "</tbody></table>"
end
end

0 comments on commit 9501a11

Please sign in to comment.