From ac56c0c99ccd14c7229145fc22d6e9eb13ee0af0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 25 Jun 2012 17:49:35 +0000 Subject: Ability to close projects (read-only) (#3640). A new permission (Close/reopen project) is available to give non-admin users the ability to close their projects. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9883 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/show.html.erb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/views/projects/show.html.erb') diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 4963ebbe4..7bd37fc7b 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -2,14 +2,27 @@ <% if User.current.allowed_to?(:add_subprojects, @project) %> <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %> <% end %> + <% if User.current.allowed_to?(:close_project, @project) %> + <% if @project.active? %> + <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %> + <% else %> + <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %> + <% end %> + <% end %>

<%=l(:label_overview)%>

+<% unless @project.active? %> +

<%= l(:text_project_closed) %>

+<% end %> +
+ <% if @project.description.present? %>
<%= textilizable @project.description %>
+ <% end %>