-<h1>Listing Ground Colors</h1>
+<h1><%= t '.title' -%></h1>
<table>
<tr>
- <th>id</th>
- <th>panel_id</th>
- <th>color_id</th>
- <th>z</th>
+ <th><%= t_m 'GroundColor.panel_id' -%></th>
+ <th><%= t_m 'GroundColor.color_id' -%></th>
+ <th><%= t_m 'GroundColor.z' -%></th>
+ <th><%= t_m 'GroundColor.created_at' -%></th>
+ <th><%= t_m 'GroundColor.updated_at' -%></th>
</tr>
-<% @ground_colors.each do |gc| %>
- <tr>
- <td><%= gc.id %></td>
- <td><%= link_to gc.panel_id, panel_path(gc.panel_id) %></td>
- <td><%= link_to gc.color_id, color_path(gc.color_id) %></td>
- <td><%= gc.z %></td>
- </tr>
-<% end -%>
+ <% @ground_colors.each do |gc| %>
+ <tr>
+ <td><%= link_to gc.panel_id, panel_path(gc.panel_id) %></td>
+ <td style="color: #<%= format("%06x", gc.color.code ^ 0xffffff) -%>; background-color: #<%= format("%06x", gc.color.code) -%>;"><%= h gc.color.name %></td>
+ <td><%= gc.z %></td>
+ <td><%= distance_of_time_in_words_to_now gc.created_at %></td>
+ <td><%= distance_of_time_in_words_to_now gc.updated_at %></td>
+ </tr>
+ <% end -%>
</table>