OSDN Git Service

t#32025:comic rename
[pettanr/pettanr.git] / app / views / authors / scrolls.html.erb
diff --git a/app/views/authors/scrolls.html.erb b/app/views/authors/scrolls.html.erb
new file mode 100644 (file)
index 0000000..73db7bf
--- /dev/null
@@ -0,0 +1,28 @@
+<h1><%= t '.title' -%></h1>
+
+<table>
+  <% @scrolls.each do |scroll| %>
+    <tr>
+      <td>
+        <%= link_to scroll_icon(:object => scroll, :size => 25), scroll_path(scroll) %>
+        <%= link_to h(truncate(scroll.title, :length => 40)), :controller => 'scroll_panels', :action => :scroll, :id => scroll.id %>
+        (<%= scroll.scroll_panels.size -%>)
+      </td>
+      <td>
+        <%= distance_of_time_in_words_to_now scroll.updated_at %>
+      </td>
+      <td>
+        <%= link_to author_icon(:object => scroll.author, :size => 25), scroll_path(scroll.author) %>
+        <%= link_to h(truncate(scroll.author.name, :length => 12)), author_path(scroll.author) %>
+      </td>
+      <td>
+        <% 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>
+  <% end %>
+</table>
+<%= paginate(@paginate) %>
+<%= link_to t('scrolls.new.title'), new_scroll_path %>