Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -20,15 +22,8 @@ class ProjectEnumerationsController < ApplicationController
|
|||
before_action :authorize
|
||||
|
||||
def update
|
||||
if params[:enumerations]
|
||||
saved = Project.transaction do
|
||||
params[:enumerations].each do |id, activity|
|
||||
@project.update_or_create_time_entry_activity(id, activity)
|
||||
end
|
||||
end
|
||||
if saved
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
end
|
||||
if @project.update_or_create_time_entry_activities(update_params)
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
end
|
||||
|
||||
redirect_to settings_project_path(@project, :tab => 'activities')
|
||||
|
@ -41,4 +36,12 @@ class ProjectEnumerationsController < ApplicationController
|
|||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to settings_project_path(@project, :tab => 'activities')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_params
|
||||
params.
|
||||
permit(:enumerations => [:parent_id, :active, {:custom_field_values => {}}]).
|
||||
require(:enumerations)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue