diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-19 23:00:44 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-19 23:00:44 +0400 |
commit | d1aff25ca4d20c39340936b2fa2976349f028e43 (patch) | |
tree | 446e78db5c883967c647522e0e4732dd8d273e95 /app/views/projects/milestones/show.html.haml | |
parent | 3cdb8f26c9c1580d33557a0f619a90989df23245 (diff) |
Consistent place for state-label across issues, mr, milestones
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/milestones/show.html.haml')
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index a5bd7a29019..fda39a6f963 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -3,15 +3,21 @@ Milestone ##{@milestone.iid} %small = @milestone.expires_at + - if @milestone.closed? + %span.state-label.state-label-red Closed + - elsif @milestone.expired? + %span.state-label.state-label-red Expired + - else + %span.state-label.state-label-green Open .pull-right - if can?(current_user, :admin_milestone, @project) = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do %i.icon-edit Edit - if @milestone.active? - = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" + = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove grouped" - else - = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn" + = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn grouped" - if @milestone.issues.any? && @milestone.can_be_closed? .alert.alert-success @@ -25,10 +31,6 @@ .ui-box.ui-box-show .ui-box-head %h4.box-title - - if @milestone.closed? - .state-label.state-label-red Closed - - elsif @milestone.expired? - .state-label.state-label-red Expired = gfm escape_once(@milestone.title) |