diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-16 15:23:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-16 15:23:11 +0000 |
commit | e9f62d1209bfa81df33bcb390eb67ba4cab90c0a (patch) | |
tree | 40dff8ceb02a30dce788799904d4a8c145d0d6e2 /app/views/users | |
parent | 0e3017dc62c672a291cda6053aaba6bda39b2de4 (diff) | |
download | redmine-e9f62d1209bfa81df33bcb390eb67ba4cab90c0a.tar.gz redmine-e9f62d1209bfa81df33bcb390eb67ba4cab90c0a.zip |
Enable ability for administrators to delete users (#7296).
User's personal data (eg. preferences, tokens, private queries...) are deleted, public data (eg. issues, wiki edits, attachments...) are reassigned to the anonymous user.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4729 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/edit.rhtml | 1 | ||||
-rw-r--r-- | app/views/users/index.rhtml | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/views/users/edit.rhtml b/app/views/users/edit.rhtml index 0d9cb0133..0c5883e8b 100644 --- a/app/views/users/edit.rhtml +++ b/app/views/users/edit.rhtml @@ -1,6 +1,7 @@ <div class="contextual"> <%= link_to l(:label_profile), user_path(@user), :class => 'icon icon-user' %> <%= change_status_link(@user) %> +<%= link_to(l(:button_delete), @user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') if User.current != @user %> </div> <h2><%= link_to l(:label_user_plural), :controller => 'users', :action => 'index' %> » <%=h @user.login %></h2> diff --git a/app/views/users/index.rhtml b/app/views/users/index.rhtml index 69ad73747..07308265e 100644 --- a/app/views/users/index.rhtml +++ b/app/views/users/index.rhtml @@ -37,7 +37,10 @@ <td align="center"><%= checked_image user.admin? %></td> <td class="created_on" align="center"><%= format_time(user.created_on) %></td> <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> - <td><small><%= change_status_link(user) %></small></td> + <td class="buttons"> + <%= change_status_link(user) %> + <%= link_to(l(:button_delete), user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == user %> + </td> </tr> <% end -%> </tbody> |