|
|
@ -405,13 +405,14 @@ module ApplicationHelper |
|
|
|
width = options[:width] || '100px;' |
|
|
|
width = options[:width] || '100px;' |
|
|
|
legend = options[:legend] || '' |
|
|
|
legend = options[:legend] || '' |
|
|
|
total_progress = options[:hide_total_progress] ? '' : t(:total_progress) |
|
|
|
total_progress = options[:hide_total_progress] ? '' : t(:total_progress) |
|
|
|
|
|
|
|
percent_sign = options[:hide_percent_sign] ? '' : '%' |
|
|
|
|
|
|
|
|
|
|
|
content_tag :span do |
|
|
|
content_tag :span do |
|
|
|
progress = content_tag :span, class: 'progress-bar', style: "width: #{width}" do |
|
|
|
progress = content_tag :span, class: 'progress-bar', style: "width: #{width}" do |
|
|
|
concat content_tag(:span, '', class: 'inner-progress closed', style: "width: #{closed}%") |
|
|
|
concat content_tag(:span, '', class: 'inner-progress closed', style: "width: #{closed}%") |
|
|
|
concat content_tag(:span, '', class: 'inner-progress done', style: "width: #{done}%") |
|
|
|
concat content_tag(:span, '', class: 'inner-progress done', style: "width: #{done}%") |
|
|
|
end |
|
|
|
end |
|
|
|
progress + content_tag(:span, "#{legend}% #{total_progress}", class: 'progress-bar-legend') |
|
|
|
progress + content_tag(:span, "#{legend}#{percent_sign} #{total_progress}", class: 'progress-bar-legend') |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|