OSDN Git Service

t#30102:update i18n op rp au ar gc gp pc
[pettanr/pettanr.git] / app / views / artists / index.html.erb
index 760580b..7d64061 100644 (file)
@@ -1,21 +1,17 @@
-<h1>Listing artists</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>author</th>
-    <th>name</th>
-    <th></th>
+    <th><%= t_m 'Artist.name' -%></th>
+    <th><%= t_m 'Artist.created_at' -%></th>
+    <th><%= t_m 'Artist.updated_at' -%></th>
   </tr>
 
-<% @artists.each do |artist| %>
-  <tr>
-    <td><%= artist.author_id %></td>
-    <td><%= h artist.name %></td>
-    <td><%= link_to 'Show', artist %></td>
-  </tr>
-<% end %>
+  <% @artists.each do |artist| %>
+    <tr>
+      <td><%= link_to h(truncate(artist.name, :length => 12)), artist_path(artist) %></td>
+      <td><%= distance_of_time_in_words_to_now artist.created_at %></td>
+      <td><%= distance_of_time_in_words_to_now artist.updated_at %></td>
+    </tr>
+  <% end %>
 </table>
-<%= link_to 'artist register', new_artist_path, :remote => true %>
-  <div id="register">
-reg
-  </div>