OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / views / stories / _append_panel.html.erb
diff --git a/app/views/stories/_append_panel.html.erb b/app/views/stories/_append_panel.html.erb
new file mode 100644 (file)
index 0000000..241bcf8
--- /dev/null
@@ -0,0 +1,21 @@
+<tr>
+  <td>
+    <%= link_to panel_icon(:object => panel, :size => 25), panel_path(panel) %>
+    <%= link_to author_icon(:object => panel.author, :size => 17), author_path(panel.author) %>
+  </td>
+  <td>
+    <%= link_to h(truncate(h(panel.caption), :length => 40)), :controller => 'stories', :action => :comic, :id => comic.id %>
+  </td>
+  <td>
+    <%= l panel.updated_at %>
+  </td>
+  <td>
+    <% @story = Story.new :comic_id => comic.id, :panel_id => panel.id -%>
+    <%= form_for(@story) do |f| %>
+      <%= f.hidden_field :comic_id %>
+      <%= f.hidden_field :t %>
+      <%= f.hidden_field :panel_id %>
+      <%= f.submit t('stories.comic.append') %>
+    <% end %>
+  </td>
+</tr>