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 | 4 | = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do |
5 | 5 | %i.icon-edit |
6 | 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 | 8 | %h4 |
10 | 9 | = link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone) |
11 | 10 | - if milestone.expired? and not milestone.closed? | ... | ... |
app/views/projects/milestones/show.html.haml
1 | 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 | 22 | .ui-box.ui-box-show |
32 | 23 | .ui-box-head |
... | ... | @@ -69,6 +60,11 @@ |
69 | 60 | Participants |
70 | 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 | 69 | .tab-content |
74 | 70 | .tab-pane.active#tab-issues | ... | ... |