From 83bcc1f043511d85414ca3cafc1e10dc84b9da24 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 10 Oct 2012 17:38:17 +0000 Subject: Adds a setting to allow subtasks to belong to other projects (#5487). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10587 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 4 ++-- app/helpers/settings_helper.rb | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 1ba4c4635..2cc387ff8 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -65,7 +65,7 @@ module IssuesHelper s = '' ancestors = issue.root? ? [] : issue.ancestors.visible.all ancestors.each do |ancestor| - s << '
' + content_tag('p', link_to_issue(ancestor)) + s << '
' + content_tag('p', link_to_issue(ancestor, :project => (issue.project_id != ancestor.project_id))) end s << '
' subject = h(issue.subject) @@ -82,7 +82,7 @@ module IssuesHelper issue_list(issue.descendants.visible.sort_by(&:lft)) do |child, level| s << content_tag('tr', content_tag('td', check_box_tag("ids[]", child.id, false, :id => nil), :class => 'checkbox') + - content_tag('td', link_to_issue(child, :truncate => 60), :class => 'subject') + + content_tag('td', link_to_issue(child, :truncate => 60, :project => (issue.project_id != child.project_id)), :class => 'subject') + content_tag('td', h(child.status)) + content_tag('td', link_to_user(child.assigned_to)) + content_tag('td', progress_bar(child.done_ratio, :width => '80px')), diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index dd20f24c6..c1fa8ea64 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -91,4 +91,16 @@ module SettingsHelper l_or_humanize(notifiable.name, :prefix => 'label_').html_safe, :class => notifiable.parent.present? ? "parent" : '').html_safe end + + def cross_project_subtasks_options + options = [ + [:label_disabled, ''], + [:label_cross_project_system, 'system'], + [:label_cross_project_tree, 'tree'], + [:label_cross_project_hierarchy, 'hierarchy'], + [:label_cross_project_descendants, 'descendants'] + ] + + options.map {|label, value| [l(label), value.to_s]} + end end -- cgit v1.2.3