diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-25 17:49:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-25 17:49:35 +0000 |
commit | ac56c0c99ccd14c7229145fc22d6e9eb13ee0af0 (patch) | |
tree | f54401b77f7195a1795f4a189f9f9d35734c0a2b /app/views/projects | |
parent | 5961a1e70d1efdfb5c4fd28c20dc8cc4d9a51bac (diff) | |
download | redmine-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')
-rw-r--r-- | app/views/projects/index.html.erb | 8 | ||||
-rw-r--r-- | app/views/projects/show.html.erb | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 42b400ff7..3d527917a 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -25,4 +25,12 @@ <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> <% end %> +<% content_for :sidebar do %> + <%= form_tag({}, :method => :get) do %> + <h3><%= l(:label_project_plural) %></h3> + <label for="closed"><%= check_box_tag 'closed', 1, params[:closed] %> <%= l(:label_show_closed_projects) %></label> + <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> + <% end %> +<% end %> + <% html_title(l(:label_project_plural)) -%> 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> |