OSDN Git Service

t#32025:comic rename
[pettanr/pettanr.git] / app / views / panels / _append_scroll.html.erb
diff --git a/app/views/panels/_append_scroll.html.erb b/app/views/panels/_append_scroll.html.erb
new file mode 100644 (file)
index 0000000..83aef11
--- /dev/null
@@ -0,0 +1,32 @@
+<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 %>
+      <% @scroll_panel = ScrollPanel.new :scroll_id => scroll.id, :panel_id => panel.id %>
+      <%= form_for(@scroll_panel) do |f| %>
+        <%= f.hidden_field :scroll_id %>
+        <%= f.hidden_field :t %>
+        <%= f.hidden_field :panel_id %>
+        <div class="actions">
+          <%= f.submit t('panels.show.append') %>
+        </div>
+      <% end %>
+    <% end %>
+  </td>
+</tr>
+<tr>
+  <td colspan="4">
+    <%= h(truncate(scroll.description, :length => 40)) %>
+  </td>
+</tr>