diff options
author | Go MAEDA <maeda@farend.jp> | 2018-06-18 06:13:18 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-06-18 06:13:18 +0000 |
commit | d32f0073193903bd708fc66c45ba29000eb44e8d (patch) | |
tree | c923b4ebc77d5698c64b2348d1a4a25e5d8ada96 /app/helpers/timelog_helper.rb | |
parent | 438d2f65fded1c7f57a370f6f3d6ccc752cadaec (diff) | |
download | redmine-d32f0073193903bd708fc66c45ba29000eb44e8d.tar.gz redmine-d32f0073193903bd708fc66c45ba29000eb44e8d.zip |
Add links to Users, Projects and Versions in timelog report (#29042).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17404 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/timelog_helper.rb')
-rw-r--r-- | app/helpers/timelog_helper.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/helpers/timelog_helper.rb b/app/helpers/timelog_helper.rb index aa6e0f3b6..89ed99601 100644 --- a/app/helpers/timelog_helper.rb +++ b/app/helpers/timelog_helper.rb @@ -58,16 +58,12 @@ module TimelogHelper sum end - def format_criteria_value(criteria_options, value) + def format_criteria_value(criteria_options, value, html=true) if value.blank? "[#{l(:label_none)}]" elsif k = criteria_options[:klass] obj = k.find_by_id(value.to_i) - if obj.is_a?(Issue) - obj.visible? ? "#{obj.tracker} ##{obj.id}: #{obj.subject}" : "##{obj.id}" - else - obj - end + format_object(obj, html) elsif cf = criteria_options[:custom_field] format_value(value, cf) else @@ -103,7 +99,7 @@ module TimelogHelper hours_for_value = select_hours(hours, criteria[level], value) next if hours_for_value.empty? row = [''] * level - row << format_criteria_value(available_criteria[criteria[level]], value).to_s + row << format_criteria_value(available_criteria[criteria[level]], value, false).to_s row += [''] * (criteria.length - level - 1) total = 0 periods.each do |period| |