gitlab-org--gitlab-foss/app/helpers/milestones_helper.rb
2015-03-09 15:20:32 -07:00

22 lines
542 B
Ruby

module MilestonesHelper
def milestones_filter_path(opts = {})
if @project
namespace_project_milestones_path(@project.namespace, @project, opts)
elsif @group
group_milestones_path(@group, opts)
else
dashboard_milestones_path(opts)
end
end
def milestone_progress_bar(milestone)
options = {
class: 'progress-bar progress-bar-success',
style: "width: #{milestone.percent_complete}%;"
}
content_tag :div, class: 'progress' do
content_tag :div, nil, options
end
end
end