summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-09-15 04:15:13 +0000
committerGo MAEDA <maeda@farend.jp>2020-09-15 04:15:13 +0000
commitdbe76a23b3646236e350a2def99d54dada32e49a (patch)
treee62a6e31c5c89270098149851c9740e702478722 /app/views/projects
parent607071128fd7f989d80aac30b2ebd791007c449b (diff)
downloadredmine-dbe76a23b3646236e350a2def99d54dada32e49a.tar.gz
redmine-dbe76a23b3646236e350a2def99d54dada32e49a.zip
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
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/destroy.html.erb2
-rw-r--r--app/views/projects/show.html.erb3
2 files changed, 4 insertions, 1 deletions
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 @@
<p>
<%= 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 %>
</p>
<% 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) %>