OSDN Git Service

m
[pettanr/pettanr.git] / app / views / scrolls / _list_item.html.erb
index 2e9d719..0bae33a 100644 (file)
@@ -1,25 +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 -%>)
+    <%= link_to scroll_icon(:object => scroll, :size => 25), scroll_path(scroll) %>
+    <%= link_to h(truncate(scroll.title, :length => 40)), play_scroll_path(scroll) %>
+    (<%= scroll.scroll_panels.size -%>)
   </td>
   <td>
-    <%= distance_of_time_in_words_to_now comic.updated_at %>
+    <%= distance_of_time_in_words_to_now scroll.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) %>
+    <%= link_to author_icon(:object => scroll.author, :size => 25), author_path(scroll.author) %>
+    <%= link_to h(truncate(scroll.author.name, :length => 12)), author_path(scroll.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 %>
+    <% if scroll.own? author %>
+      <%= link_to t('link.edit'), edit_scroll_path(scroll) %>
+      <%= link_to t('link.destroy'), scroll_path(scroll), :method => :delete %>
     <% end %>
   </td>
 </tr>
 <tr>
   <td colspan="4">
-    <%= h(truncate(comic.description, :length => 40)) %>
+    <%= h(truncate(scroll.description, :length => 40)) %>
   </td>
 </tr>