OSDN Git Service

import all source code
[pettanr/pettanr.git] / app / views / original_pictures / _uploader.html.erb
diff --git a/app/views/original_pictures/_uploader.html.erb b/app/views/original_pictures/_uploader.html.erb
new file mode 100644 (file)
index 0000000..21555b3
--- /dev/null
@@ -0,0 +1,12 @@
+<% if author_signed_in? -%>
+  <% if current_author.artist? -%>
+    <%= form_tag( {:action => "create"} , { :multipart => true }) do %>
+      <label for="file">File to Upload</label> <%= file_field_tag "original_picture[file]" %>
+      <%= submit_tag 'upload' -%>
+    <% end -%>
+  <% else -%>
+    <%= render 'artist_register' %>
+  <% end -%>
+<% else -%>
+  素材を投稿するなら<%= link_to "ログイン", new_author_session_path %>
+<% end -%>