15 |
15 |
# along with this program; if not, write to the Free Software
|
16 |
16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
17 |
17 |
|
|
18 |
require 'context_menus_helper'
|
|
19 |
|
18 |
20 |
module Redmine
|
19 |
21 |
module Helpers
|
20 |
22 |
# Simple class to handle gantt chart data
|
21 |
|
class Gantt
|
|
23 |
class Gantt # FIXME: inherit < Redmine::Hook::ViewListener
|
22 |
24 |
include ERB::Util
|
23 |
25 |
include Redmine::I18n
|
24 |
26 |
include Redmine::Utils::DateCalculation
|
|
27 |
include ContextMenusHelper
|
25 |
28 |
|
26 |
29 |
# Relation types that are rendered
|
27 |
30 |
DRAW_TYPES = {
|
... | ... | |
361 |
364 |
end
|
362 |
365 |
output = case options[:format]
|
363 |
366 |
when :html
|
364 |
|
css_classes = ''
|
|
367 |
css_classes = 'hascontextmenu'
|
365 |
368 |
css_classes << ' issue-overdue' if issue.overdue?
|
366 |
369 |
css_classes << ' issue-behind-schedule' if issue.behind_schedule?
|
367 |
370 |
css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to
|
... | ... | |
381 |
384 |
:title => assigned_string).to_s.html_safe
|
382 |
385 |
end
|
383 |
386 |
s << view.link_to_issue(issue).html_safe
|
|
387 |
# FIXME: causes undefined method error in ContextMenuHelper -> due to Gantt class not inherited from Redmine::Hook::ViewListener ???
|
|
388 |
# s << context_menu_link("##{issue.id}", {:controller => "issues", :action => "show", :id => issue}, :class => issue.css_classes, :title => "").html_safe
|
384 |
389 |
subject = view.content_tag(:span, s, :class => css_classes).html_safe
|
385 |
390 |
html_subject(options, subject, :css => "issue-subject",
|
386 |
391 |
:title => issue.subject, :id => "issue-#{issue.id}") + "\n"
|