프로젝트

일반

사용자정보

« 뒤로 | 다음 » 

개정판 671b8894

오 재복이(가) 2021-11-25에 추가

  • ID 671b889403309db24a35c5c80035dfa7f72b17ab
  • 상위 bcdc74bc
4.1 higher 2.1.1

차이점 보기:

openalm_project_tree_view/redmine_4.1_higher/openalm_project_tree_view/app/helpers/project_tree_view_helper.rb
end
project_tree(projects) do |project|
project_parent = project_tree_parent_id(projects_hash_info, project.parent_id)
result += "{ 'id' : 'tree#{project.id}', 'project_id' : '#{project.id}', 'parent' : '#{project_parent}', 'text' : '#{project.name}', 'identifier' : '#{project.identifier}' },"
end
project_custom_field_name = nil
project_custom_field_value = nil
text = project.name.gsub("'", %q(\\\'))
plugin_project_custom_field = Setting.plugin_openalm_project_tree_view['project_custom_field']
if plugin_project_custom_field.present?
project_custom_field_name = CustomField.where(id: plugin_project_custom_field).pluck(:name)
project_custom_field_value = CustomValue.where(customized_type: 'Project', customized_id: project.id,
custom_field_id: plugin_project_custom_field).pluck(:value)
if project_custom_field_name[0].present? && project_custom_field_value[0].present?
text += "(#{project_custom_field_name[0]}: #{project_custom_field_value[0]})"
end
end
result += "{ 'id' : 'tree#{project.id}', 'project_id' : '#{project.id}', 'parent' : '#{project_parent}', 'text' : '#{text}', 'identifier' : '#{project.identifier}' },"
end
result.html_safe
end
......
end
end
end
project_parent = !parent_project_id.nil? ? 'tree' + parent_project_id.to_s : '#'
project_parent
parent_project_id.nil? ? '#' : 'tree' + parent_project_id.to_s
end
end

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)