diff options
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/destroy.html.erb | 2 | ||||
-rw-r--r-- | app/views/projects/show.html.erb | 3 |
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) %> |