diff options
Diffstat (limited to 'app/views/downloads/_form.html.erb')
-rw-r--r-- | app/views/downloads/_form.html.erb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/views/downloads/_form.html.erb b/app/views/downloads/_form.html.erb new file mode 100644 index 0000000..1ab1879 --- /dev/null +++ b/app/views/downloads/_form.html.erb @@ -0,0 +1,37 @@ +<%= form_for(@download) do |f| %> + <% if @download.errors.any? %> + <div id="error_explanation"> + <h2><%= pluralize(@download.errors.count, "error") %> prohibited this download from being saved:</h2> + + <ul> + <% @download.errors.full_messages.each do |message| %> + <li><%= message %></li> + <% end %> + </ul> + </div> + <% end %> + + <div class="field"> + <%= f.label :name %><br> + <%= f.text_field :name %> + </div> + <div class="field"> + <%= f.label :filename %><br> + <%= f.text_field :filename %> + </div> + <div class="field"> + <%= f.label :type %><br> + <%= f.text_field :type %> + </div> + <div class="field"> + <%= f.label :description %><br> + <%= f.text_area :description %> + </div> + <div class="field"> + <%= f.label :hits %><br> + <%= f.number_field :hits %> + </div> + <div class="actions"> + <%= f.submit %> + </div> +<% end %> |