OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / views / comics / _list_item.html.erb
diff --git a/app/views/comics/_list_item.html.erb b/app/views/comics/_list_item.html.erb
new file mode 100644 (file)
index 0000000..2e9d719
--- /dev/null
@@ -0,0 +1,25 @@
+<tr>
+  <td>
+    <%= link_to comic_icon(:object => comic, :size => 25), comic_path(comic) %>
+    <%= link_to h(truncate(comic.title, :length => 40)), :controller => 'stories', :action => :comic, :id => comic.id %>
+    (<%= comic.stories.size -%>)
+  </td>
+  <td>
+    <%= distance_of_time_in_words_to_now comic.updated_at %>
+  </td>
+  <td>
+    <%= link_to author_icon(:object => comic.author, :size => 25), comic_path(comic.author) %>
+    <%= link_to h(truncate(comic.author.name, :length => 12)), author_path(comic.author) %>
+  </td>
+  <td>
+    <% if comic.own? author %>
+      <%= link_to t('link.edit'), edit_comic_path(comic) %>
+      <%= link_to t('link.destroy'), comic_path(comic), :method => :delete %>
+    <% end %>
+  </td>
+</tr>
+<tr>
+  <td colspan="4">
+    <%= h(truncate(comic.description, :length => 40)) %>
+  </td>
+</tr>