summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-22 15:45:36 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-22 15:45:36 +0300
commit9a00bbda89ab22f533db725e751ad46ff68c2cbe (patch)
tree9b2c3896f2550018ec30960fa4dd13958ffa3ea7 /app/views/projects
parent0fcd89e3ac810bb137240edf86fac5b80d52faed (diff)
downloadgitlab-ce-9a00bbda89ab22f533db725e751ad46ff68c2cbe.tar.gz
Show reopen milestone button if milestone was closed
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/milestones/show.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 8a5c2a938b1..b755a813419 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -8,7 +8,10 @@
= link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do
%i.icon-edit
Edit
- = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove"
+ - if @milestone.active?
+ = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove"
+ - else
+ = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn"
- if @milestone.issues.any? && @milestone.can_be_closed?
.alert.alert-success