OSDN Git Service

merge v06sheet
[pettanr/pettanr.git] / app / views / scroll_panels / _append_scroll.html.erb
diff --git a/app/views/scroll_panels/_append_scroll.html.erb b/app/views/scroll_panels/_append_scroll.html.erb
new file mode 100644 (file)
index 0000000..1813b38
--- /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)), play_scroll_path(scroll) %>
+    (<%= 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), author_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('scroll_panels.append.scroll') %>
+        </div>
+      <% end %>
+    <% end %>
+  </td>
+</tr>
+<tr>
+  <td colspan="4">
+    <%= h(truncate(scroll.description, :length => 40)) %>
+  </td>
+</tr>