Commit 7683efc6be4a57fe2105916879dc8c50f4024086
1 parent
b6d0dd87
Exists in
master
and in
4 other branches
Added ability to close milestone with opened issues. UI for milestone page improved
Showing
5 changed files
with
33 additions
and
28 deletions
Show diff stats
.gitignore
app/assets/stylesheets/gitlab_bootstrap/lists.scss
app/views/dashboard/projects.html.haml
app/views/projects/milestones/_milestone.html.haml
@@ -4,8 +4,7 @@ | @@ -4,8 +4,7 @@ | ||
4 | = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do | 4 | = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do |
5 | %i.icon-edit | 5 | %i.icon-edit |
6 | Edit | 6 | Edit |
7 | - - if milestone.can_be_closed? | ||
8 | - = link_to 'Close', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove" | 7 | + = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove" |
9 | %h4 | 8 | %h4 |
10 | = link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone) | 9 | = link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone) |
11 | - if milestone.expired? and not milestone.closed? | 10 | - if milestone.expired? and not milestone.closed? |
app/views/projects/milestones/show.html.haml
1 | = render "projects/issues/head" | 1 | = render "projects/issues/head" |
2 | -.row | ||
3 | - .span6 | ||
4 | - %h3.page-title | ||
5 | - Milestone ##{@milestone.id} | ||
6 | - %small | ||
7 | - = @milestone.expires_at | ||
8 | - .back-link | ||
9 | - = link_to project_milestones_path(@project) do | ||
10 | - ← To milestones list | ||
11 | - .span6 | ||
12 | - .pull-right | ||
13 | - - unless @milestone.closed? | ||
14 | - = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do | ||
15 | - %i.icon-plus | ||
16 | - New Issue | ||
17 | - = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped" | ||
18 | - - if can?(current_user, :admin_milestone, @project) | ||
19 | - = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-small grouped" do | ||
20 | - %i.icon-edit | ||
21 | - Edit | 2 | +%h3.page-title |
3 | + Milestone ##{@milestone.id} | ||
4 | + %small | ||
5 | + = @milestone.expires_at | ||
6 | + .pull-right | ||
7 | + - if can?(current_user, :admin_milestone, @project) | ||
8 | + = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do | ||
9 | + %i.icon-edit | ||
10 | + Edit | ||
11 | + = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" | ||
22 | 12 | ||
13 | +- if @milestone.issues.any? && @milestone.can_be_closed? | ||
14 | + .alert.alert-success | ||
15 | + %span All issues for this milestone are closed. You may close milestone now. | ||
23 | 16 | ||
17 | +.back-link | ||
18 | + = link_to project_milestones_path(@project) do | ||
19 | + ← To milestones list | ||
24 | 20 | ||
25 | -- if @milestone.can_be_closed? | ||
26 | - %hr | ||
27 | - %p | ||
28 | - %span All issues for this milestone are closed. You may close milestone now. | ||
29 | - = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove" | ||
30 | 21 | ||
31 | .ui-box.ui-box-show | 22 | .ui-box.ui-box-show |
32 | .ui-box-head | 23 | .ui-box-head |
@@ -69,6 +60,11 @@ | @@ -69,6 +60,11 @@ | ||
69 | Participants | 60 | Participants |
70 | %span.badge= @users.count | 61 | %span.badge= @users.count |
71 | 62 | ||
63 | + .pull-right | ||
64 | + = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do | ||
65 | + %i.icon-plus | ||
66 | + New Issue | ||
67 | + = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link grouped" | ||
72 | 68 | ||
73 | .tab-content | 69 | .tab-content |
74 | .tab-pane.active#tab-issues | 70 | .tab-pane.active#tab-issues |