OSDN Git Service

merge v04
[pettanr/pettanr.git] / app / views / stories / _editform.html.erb
diff --git a/app/views/stories/_editform.html.erb b/app/views/stories/_editform.html.erb
new file mode 100644 (file)
index 0000000..9cc6dd4
--- /dev/null
@@ -0,0 +1,28 @@
+<%= form_for(@story) do |f| %>
+  <% if @story.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@story.errors.count, "error") %> prohibited this comic from being saved:</h2>
+
+      <ul>
+      <% @story.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="field">
+    <%= f.hidden_field :comic_id %>
+  </div>
+  <div class="field">
+    <%= f.number_field :t %>
+  </div>
+  <div class="field">
+    <%= f.hidden_field :panel_id %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
+<%= button_to 'Destroy', @story.panel, confirm: 'Are you sure?', method: :delete %>