X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Fproducts%2Fnew.html.erb;fp=app%2Fviews%2Fproducts%2Fnew.html.erb;h=9eac9ae2ef1ed723c9c91d4c7f6a29c480e3f68a;hb=09cd438e77dd418b03b67e3e6a4b48ec95b72d1d;hp=0000000000000000000000000000000000000000;hpb=be9356cf35ae0ccfc15674b786386a61278bf305;p=depot.git

diff --git a/app/views/products/new.html.erb b/app/views/products/new.html.erb
new file mode 100644
index 0000000..9eac9ae
--- /dev/null
+++ b/app/views/products/new.html.erb
@@ -0,0 +1,31 @@
+<h1>New product</h1>
+
+<% form_for(@product) do |f| %>
+  <%= f.error_messages %>
+
+  <p>
+    <%= f.label :title %><br />
+    <%= f.text_field :title %>
+  </p>
+  <p>
+    <%= f.label :description %><br />
+    <%= f.text_area :description %>
+  </p>
+  <p>
+    <%= f.label :image_url %><br />
+    <%= f.text_field :image_url %>
+  </p>
+  <p>
+    <%= f.label :price %><br />
+    <%= f.text_field :price %>
+  </p>
+  <p>
+    <%= f.label :date_available %><br />
+    <%= f.date_select :date_available, :order => [:day, :month, :year] %>
+  </p>
+  <p>
+    <%= f.submit "Create" %>
+  </p>
+<% end %>
+
+<%= link_to 'Back', products_path %>