|
|
@ -10,16 +10,18 @@ module BurndownChartsHelper |
|
|
|
|
|
|
|
|
|
|
|
labels << "[#{(mvalue) * 25}, '<span class=\"axislabel\">#{l('backlogs.hours')}/<br>#{l('backlogs.points')}</span>']" |
|
|
|
labels << "[#{(mvalue) * 25}, '<span class=\"axislabel\">#{l('backlogs.hours')}/<br>#{l('backlogs.points')}</span>']" |
|
|
|
|
|
|
|
|
|
|
|
labels.join(', ') |
|
|
|
result = labels.join(', ') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def xaxis_labels(burndown) |
|
|
|
def xaxis_labels(burndown) |
|
|
|
burndown.days.enum_for(:each_with_index).collect{|d,i| "[#{i+1}, '#{escape_javascript(::I18n.t('date.abbr_day_names')[d.wday % 7])}']"}.join(',') + |
|
|
|
burndown.days.enum_for(:each_with_index).collect{|d,i| "[#{i+1}, '#{escape_javascript(::I18n.t('date.abbr_day_names')[d.wday % 7])}']"}.join(',').html_safe + |
|
|
|
", [#{burndown.days.length + 1}, '<span class=\"axislabel\">#{I18n.t('backlogs.date')}</span>']" |
|
|
|
", [#{burndown.days.length + 1}, '<span class=\"axislabel\">#{I18n.t('backlogs.date')}</span>']".html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def dataseries(burndown) |
|
|
|
def dataseries(burndown) |
|
|
|
burndown.series.collect{|s| "#{s.first.to_s}: {label: '#{l('backlogs.' + s.first.to_s)}', data: [#{s.last.enum_for(:each_with_index).collect{|s, i| "[#{i+1}, #{s}] "}.join(', ')}]} "} |
|
|
|
burndown.series.collect{|s| "#{s.first.to_s}: {label: '#{l('backlogs.' + s.first.to_s)}', data: [#{s.last.enum_for(:each_with_index).collect{|s, i| "[#{i+1}, #{s}] "}.join(', ')}]} "}.join(', ').html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def burndown_series_checkboxes(burndown) |
|
|
|
def burndown_series_checkboxes(burndown) |
|
|
@ -27,6 +29,6 @@ module BurndownChartsHelper |
|
|
|
burndown.series(:all).collect{|s| s.first.to_s }.sort.each do |series| |
|
|
|
burndown.series(:all).collect{|s| s.first.to_s }.sort.each do |series| |
|
|
|
boxes += "<input class=\"series_enabled\" type=\"checkbox\" id=\"#{series}\" name=\"#{series}\" value=\"#{series}\" checked>#{l('backlogs.' + series.to_s)}<br/>" |
|
|
|
boxes += "<input class=\"series_enabled\" type=\"checkbox\" id=\"#{series}\" name=\"#{series}\" value=\"#{series}\" checked>#{l('backlogs.' + series.to_s)}<br/>" |
|
|
|
end |
|
|
|
end |
|
|
|
boxes |
|
|
|
boxes.html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |