Replace progress tag to div class progress
This commit is contained in:
@@ -2,13 +2,17 @@ module MilestonesHelper
|
|||||||
def progress_tag_for(progress_bar)
|
def progress_tag_for(progress_bar)
|
||||||
text = number_to_percentage(progress_bar.percentage, precision: 0)
|
text = number_to_percentage(progress_bar.percentage, precision: 0)
|
||||||
|
|
||||||
content_tag :span do
|
content_tag :div, class: "progress",
|
||||||
content_tag(:span, "", "data-text": text, style: "width: #{progress_bar.percentage}%;") +
|
role: "progressbar",
|
||||||
content_tag(:progress,
|
"aria-valuenow": "#{progress_bar.percentage}",
|
||||||
text,
|
"aria-valuetext": "#{progress_bar.percentage}%",
|
||||||
class: progress_bar.primary? ? "primary" : "",
|
"aria-valuemax": ProgressBar::RANGE.max,
|
||||||
max: ProgressBar::RANGE.max,
|
"aria-valuemin": "0",
|
||||||
value: progress_bar.percentage)
|
tabindex: "0" do
|
||||||
|
content_tag(:span, "",
|
||||||
|
class: "progress-meter",
|
||||||
|
style: "width: #{progress_bar.percentage}%;") +
|
||||||
|
content_tag(:p, text, class: "progress-meter-text")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user