diff --git a/app/views/imports/_table.html.erb b/app/views/imports/_table.html.erb index 4b7c32f5..5cc3a49c 100644 --- a/app/views/imports/_table.html.erb +++ b/app/views/imports/_table.html.erb @@ -1,5 +1,5 @@ <%# locals: (headers: [], rows: [], caption: nil) %> -
+
<% if caption %>
@@ -8,40 +8,38 @@

<%= caption %>

<% end %> -
-
- - +
+
+ + + <% headers.each_with_index do |header, index| %> + + <% end %> + + + + <% rows.each_with_index do |row, row_index| %> - <% headers.each_with_index do |header, index| %> - <% end %> - - - <% rows.each_with_index do |row, row_index| %> - - <% row.each_with_index do |(header, value), col_index| %> - - <% end %> - - <% end %> - -
+ <%= index == headers.length - 1 ? "rounded-tr-lg" : "" %> + <%= index < headers.length - 1 ? "border-r border-r-alpha-black-200" : "" %> + "> + <%= header %> +
- <%= index == headers.length - 1 ? "rounded-tr-md" : "" %> - <%= index < headers.length - 1 ? "border-r border-r-alpha-black-200" : "" %> + <% row.each_with_index do |(header, value), col_index| %> + + <%= !caption && row_index == rows.length - 1 && col_index == 0 ? "rounded-bl-md" : "" %> + <%= !caption && row_index == rows.length - 1 && col_index == row.length - 1 ? "rounded-br-md" : "" %> "> - <%= header %> - + <%= value %> +
- <%= !caption && row_index == rows.length - 1 && col_index == 0 ? "rounded-bl-md" : "" %> - <%= !caption && row_index == rows.length - 1 && col_index == row.length - 1 ? "rounded-br-md" : "" %> - "> - <%= value %> -
-
+ <% end %> + +