summaryrefslogtreecommitdiffstats
path: root/app/views/projects/show.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-06-25 17:49:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-06-25 17:49:35 +0000
commitac56c0c99ccd14c7229145fc22d6e9eb13ee0af0 (patch)
treef54401b77f7195a1795f4a189f9f9d35734c0a2b /app/views/projects/show.html.erb
parent5961a1e70d1efdfb5c4fd28c20dc8cc4d9a51bac (diff)
downloadredmine-ac56c0c99ccd14c7229145fc22d6e9eb13ee0af0.tar.gz
redmine-ac56c0c99ccd14c7229145fc22d6e9eb13ee0af0.zip
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
Diffstat (limited to 'app/views/projects/show.html.erb')
-rw-r--r--app/views/projects/show.html.erb13
1 files changed, 13 insertions, 0 deletions
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 %>
</div>
<h2><%=l(:label_overview)%></h2>
+<% unless @project.active? %>
+ <p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
+<% end %>
+
<div class="splitcontentleft">
+ <% if @project.description.present? %>
<div class="wiki">
<%= textilizable @project.description %>
</div>
+ <% end %>
<ul>
<% unless @project.homepage.blank? %>
<li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li>