Extract milestones progress bars to a partial
This commit is contained in:
18
app/views/milestones/_progress_bars.html.erb
Normal file
18
app/views/milestones/_progress_bars.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<% if milestoneable.primary_progress_bar %>
|
||||
<section class="progress-bars">
|
||||
<h5><%= t("milestones.index.progress") %></h5>
|
||||
|
||||
<%= progress_tag_for(milestoneable.primary_progress_bar) %>
|
||||
|
||||
<% if milestoneable.secondary_progress_bars.any? %>
|
||||
<ul class="milestone-progress">
|
||||
<% milestoneable.secondary_progress_bars.each do |progress_bar| %>
|
||||
<li>
|
||||
<%= progress_bar.title %>
|
||||
<%= progress_tag_for(progress_bar) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</section>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user