From dbe76a23b3646236e350a2def99d54dada32e49a Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 15 Sep 2020 04:15:13 +0000 Subject: Allow normal users to delete a project (#33945). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@20034 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/destroy.html.erb | 2 +- app/views/projects/show.html.erb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/destroy.html.erb b/app/views/projects/destroy.html.erb index 11137f75e..15a54d1cc 100644 --- a/app/views/projects/destroy.html.erb +++ b/app/views/projects/destroy.html.erb @@ -19,6 +19,6 @@

<%= submit_tag l(:button_delete) %> - <%= link_to l(:button_cancel), :controller => 'admin', :action => 'projects' %> + <%= link_to l(:button_cancel), User.current.admin? ? admin_projects_path : projects_path %>

<% end %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index c8745be14..18b15d840 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -12,6 +12,9 @@ <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %> <% end %> <% end %> + <% if @project.deletable? %> + <%= link_to l(:button_delete), project_path(@project), :method => :delete, :class => 'icon icon-del' %> + <% end %> <%= link_to_if_authorized l(:label_settings), {:controller => 'projects', :action => 'settings', :id => @project}, :class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %> -- cgit v1.2.3