summaryrefslogtreecommitdiffstats
path: root/app/views/my
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/my')
-rw-r--r--app/views/my/_sidebar.html.erb3
-rw-r--r--app/views/my/destroy.html.erb11
2 files changed, 14 insertions, 0 deletions
diff --git a/app/views/my/_sidebar.html.erb b/app/views/my/_sidebar.html.erb
index 407fe990f..c89e6f3b4 100644
--- a/app/views/my/_sidebar.html.erb
+++ b/app/views/my/_sidebar.html.erb
@@ -3,6 +3,9 @@
<p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
+<% if @user.own_account_deletable? %>
+ <p><%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %></p>
+<% end %>
<h4><%= l(:label_feeds_access_key) %></h4>
diff --git a/app/views/my/destroy.html.erb b/app/views/my/destroy.html.erb
new file mode 100644
index 000000000..5d6eaa004
--- /dev/null
+++ b/app/views/my/destroy.html.erb
@@ -0,0 +1,11 @@
+<h2><%=l(:label_confirmation)%></h2>
+<div class="warning">
+<p><%= simple_format l(:text_account_destroy_confirmation)%></p>
+<p>
+ <% form_tag({}) do %>
+ <label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
+ <%= submit_tag l(:button_delete_my_account) %> |
+ <%= link_to l(:button_cancel), :action => 'account' %>
+ <% end %>
+</p>
+</div>