summaryrefslogtreecommitdiff
path: root/app/views/assets/edit.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/assets/edit.html.erb')
-rw-r--r--app/views/assets/edit.html.erb20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb
index d60db94..f198600 100644
--- a/app/views/assets/edit.html.erb
+++ b/app/views/assets/edit.html.erb
@@ -1,12 +1,24 @@
1<h1>Editing asset</h1> 1<h1>Editing asset</h1>
2 2
3<% form_for(@asset) do |f| %> 3<%= form_for(@asset, html: { multipart: true }) do |f| %>
4 <%= f.error_messages %> 4 <%= form_error_messages(f) %>
5
6 <% if @asset.upload.present? %>
7 <p>
8 <strong>Current file:</strong>
9 <%= @asset.upload.url %>
10 (<%= number_to_human_size(@asset.upload.size) %>)
11 </p>
12 <% end %>
13
14 <p>
15 <label>Replace file:</label><br>
16 <%= f.file_field :upload %>
17 </p>
5 18
6 <p> 19 <p>
7 <%= f.submit 'Update' %> 20 <%= f.submit 'Update' %>
8 </p> 21 </p>
9<% end %> 22<% end %>
10 23
11<%= link_to 'Show', @asset %> | 24<%= link_to 'Show', @asset %> | <%= link_to 'Back', assets_path %>
12<%= link_to 'Back', assets_path %> \ No newline at end of file