diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-13 09:20:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-13 09:20:11 +0000 |
commit | 628d05629b734371d3e850a95dadf0be30c5ef20 (patch) | |
tree | 58a9da4e8266ee45a0800996f9228e9d2a45108c /app/helpers/issues_helper.rb | |
parent | a74d55edd99a4bae23e7d9cbd76136ffa7707ccf (diff) | |
download | redmine-628d05629b734371d3e850a95dadf0be30c5ef20.tar.gz redmine-628d05629b734371d3e850a95dadf0be30c5ef20.zip |
Role-based issue custom field visibility (#5037).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12012 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index f88a61e21..2e45d2e97 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -160,12 +160,13 @@ module IssuesHelper end def render_custom_fields_rows(issue) - return if issue.custom_field_values.empty? + values = issue.visible_custom_field_values + return if values.empty? ordered_values = [] - half = (issue.custom_field_values.size / 2.0).ceil + half = (values.size / 2.0).ceil half.times do |i| - ordered_values << issue.custom_field_values[i] - ordered_values << issue.custom_field_values[i + half] + ordered_values << values[i] + ordered_values << values[i + half] end s = "<tr>\n" n = 0 |