|
|
@ -159,7 +159,8 @@ class WorkPackagesController < ApplicationController |
|
|
|
:project => project, |
|
|
|
:project => project, |
|
|
|
:priorities => priorities, |
|
|
|
:priorities => priorities, |
|
|
|
:time_entry => time_entry, |
|
|
|
:time_entry => time_entry, |
|
|
|
:user => current_user } |
|
|
|
:user => current_user, |
|
|
|
|
|
|
|
:back_url => params[:back_url] } |
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format| |
|
|
|
respond_to do |format| |
|
|
|
format.html do |
|
|
|
format.html do |
|
|
@ -184,7 +185,7 @@ class WorkPackagesController < ApplicationController |
|
|
|
|
|
|
|
|
|
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
|
|
|
|
|
|
|
|
|
redirect_to(work_package_path(work_package)) |
|
|
|
redirect_to_back_url_or_work_package(work_package) |
|
|
|
else |
|
|
|
else |
|
|
|
edit |
|
|
|
edit |
|
|
|
end |
|
|
|
end |
|
|
@ -438,6 +439,14 @@ class WorkPackagesController < ApplicationController |
|
|
|
|
|
|
|
|
|
|
|
private |
|
|
|
private |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def redirect_to_back_url_or_work_package(work_package) |
|
|
|
|
|
|
|
if !params[:back_url].blank? |
|
|
|
|
|
|
|
redirect_to(params[:back_url]) |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
redirect_to(work_package_path(work_package)) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def load_work_packages |
|
|
|
def load_work_packages |
|
|
|
sort_init(@query.sort_criteria.empty? ? [DEFAULT_SORT_ORDER] : @query.sort_criteria) |
|
|
|
sort_init(@query.sort_criteria.empty? ? [DEFAULT_SORT_ORDER] : @query.sort_criteria) |
|
|
|
sort_update(@query.sortable_columns) |
|
|
|
sort_update(@query.sortable_columns) |
|
|
|