Commit 9a00bbda89ab22f533db725e751ad46ff68c2cbe
1 parent
0fcd89e3
Exists in
master
and in
4 other branches
Show reopen milestone button if milestone was closed
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
app/views/projects/milestones/show.html.haml
@@ -8,7 +8,10 @@ | @@ -8,7 +8,10 @@ | ||
8 | = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do | 8 | = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do |
9 | %i.icon-edit | 9 | %i.icon-edit |
10 | Edit | 10 | Edit |
11 | - = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" | 11 | + - if @milestone.active? |
12 | + = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" | ||
13 | + - else | ||
14 | + = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn" | ||
12 | 15 | ||
13 | - if @milestone.issues.any? && @milestone.can_be_closed? | 16 | - if @milestone.issues.any? && @milestone.can_be_closed? |
14 | .alert.alert-success | 17 | .alert.alert-success |