]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user/view.rhtml
Allow users to remove their image. Closes #1010.
[rails.git] / app / views / user / view.rhtml
index c5fc6388db6ddeb758d481632b0fc834d6b9c6b6..3ee8ecb86f05400a13febf02a8c463511756abe9 100644 (file)
 
 <h3>User image</h3>
 <% if @this_user.image %>
- <%= image_tag url_for_file_column(@this_user, "image") %>
+  <%= image_tag url_for_file_column(@this_user, "image") %>
+  <% if @user and @this_user.id == @user.id %>
+    <%= button_to 'Delete Image', :action => 'delete_image' %>
+  <% end %>
 <% end %>
 <br />
 
@@ -28,7 +31,7 @@
   Upload an image<br />
   <%= form_tag({:action=>'upload_image'}, :multipart => true)%>
     <%= file_column_field 'user', 'image' %>
-    <input type="submit" name="Upload" />
+    <%= submit_tag 'Add Image' %>
   </form>
 <% end %>