##// END OF EJS Templates
Keep status filter on the projects list when un/archiving a project (#3530)....
Jean-Philippe Lang -
r2706:937823a0d849
parent child
Show More
@@ -172,12 +172,12 class ProjectsController < ApplicationController
172 172
173 173 def archive
174 174 @project.archive if request.post? && @project.active?
175 redirect_to :controller => 'admin', :action => 'projects'
175 redirect_to(url_for(:controller => 'admin', :action => 'projects', :status => params[:status]))
176 176 end
177 177
178 178 def unarchive
179 179 @project.unarchive if request.post? && !@project.active?
180 redirect_to :controller => 'admin', :action => 'projects'
180 redirect_to(url_for(:controller => 'admin', :action => 'projects', :status => params[:status]))
181 181 end
182 182
183 183 # Delete @project
@@ -31,8 +31,8
31 31 <td align="center"><%= image_tag 'true.png' if project.is_public? %></td>
32 32 <td align="center"><%= format_date(project.created_on) %></td>
33 33 <td class="buttons">
34 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
35 <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
34 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
35 <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
36 36 <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
37 37 <%= link_to(l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => 'icon icon-del') %>
38 38 </td>
General Comments 0
You need to be logged in to leave comments. Login now