@@ -206,16 +206,16 class ProjectsController < ApplicationController | |||||
206 | end |
|
206 | end | |
207 |
|
207 | |||
208 | def archive |
|
208 | def archive | |
209 | if request.post? |
|
209 | unless @project.archive | |
210 | unless @project.archive |
|
210 | flash[:error] = l(:error_can_not_archive_project) | |
211 | flash[:error] = l(:error_can_not_archive_project) |
|
|||
212 | end |
|
|||
213 | end |
|
211 | end | |
214 | redirect_to admin_projects_path(:status => params[:status]) |
|
212 | redirect_to admin_projects_path(:status => params[:status]) | |
215 | end |
|
213 | end | |
216 |
|
214 | |||
217 | def unarchive |
|
215 | def unarchive | |
218 | @project.unarchive if request.post? && !@project.active? |
|
216 | unless @project.active? | |
|
217 | @project.unarchive | |||
|
218 | end | |||
219 | redirect_to admin_projects_path(:status => params[:status]) |
|
219 | redirect_to admin_projects_path(:status => params[:status]) | |
220 | end |
|
220 | end | |
221 |
|
221 |
General Comments 0
You need to be logged in to leave comments.
Login now