OSDN Git Service

t#30102:update i18n op rp au ar gc gp pc
[pettanr/pettanr.git] / app / views / panel_colors / index.html.erb
index e6a9fa2..812408c 100644 (file)
@@ -1,19 +1,21 @@
-<h1>Listing Panel Colors</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>id</th>
-    <th>panel_id</th>
-    <th>code</th>
-    <th>z</th>
+    <th><%= t_m 'PanelColor.panel_id' -%></th>
+    <th><%= t_m 'PanelColor.code' -%></th>
+    <th><%= t_m 'PanelColor.z' -%></th>
+    <th><%= t_m 'PanelColor.created_at' -%></th>
+    <th><%= t_m 'PanelColor.updated_at' -%></th>
   </tr>
 
-<% @panel_colors.each do |pc| %>
-  <tr>
-    <td><%= pc.id %></td>
-    <td><%= link_to pc.panel_id, panel_path(pc.panel_id) %></td>
-    <td><%= pc.code %><font color="<%= pc.code %>">*****</font></td>
-    <td><%= pc.z %></td>
-  </tr>
-<% end -%>
+  <% @panel_colors.each do |pc| %>
+    <tr>
+      <td><%= link_to pc.panel_id, panel_path(pc.panel_id) %></td>
+      <td style="color: #<%= format("%06x", pc.code ^ 0xffffff) -%>; background-color: #<%= format("%06x", pc.code) -%>;"><%= format("%06x", pc.code ^ 0xffffff) %></td>
+      <td><%= pc.z %></td>
+      <td><%= distance_of_time_in_words_to_now pc.created_at %></td>
+      <td><%= distance_of_time_in_words_to_now pc.updated_at %></td>
+    </tr>
+  <% end -%>
 </table>