Commit 7683efc6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Added ability to close milestone with opened issues. UI for milestone page improved

parent b6d0dd87
......@@ -30,3 +30,4 @@ vendor/bundle/*
rails_best_practices_output.html
doc/code/*
.secret
*.log
......@@ -83,4 +83,13 @@ ul.bordered-list {
a { color: #777; }
}
}
&.top-list {
li:first-child {
padding-top: 0;
h4, h5 {
margin-top: 0;
}
}
}
}
......@@ -36,7 +36,7 @@
= label.name
.span9
%ul.bordered-list.my-projects
%ul.bordered-list.my-projects.top-list
- @projects.each do |project|
%li
%h4.project-title
......
......@@ -4,8 +4,7 @@
= link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do
%i.icon-edit
Edit
- if milestone.can_be_closed?
= link_to 'Close', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove"
= link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove"
%h4
= link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone)
- if milestone.expired? and not milestone.closed?
......
= render "projects/issues/head"
.row
.span6
%h3.page-title
Milestone ##{@milestone.id}
%small
= @milestone.expires_at
.back-link
= link_to project_milestones_path(@project) do
← To milestones list
.span6
.pull-right
- unless @milestone.closed?
= link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do
%i.icon-plus
New Issue
= link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped"
- if can?(current_user, :admin_milestone, @project)
= link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-small grouped" do
%i.icon-edit
Edit
%h3.page-title
Milestone ##{@milestone.id}
%small
= @milestone.expires_at
.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
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove"
- if @milestone.issues.any? && @milestone.can_be_closed?
.alert.alert-success
%span All issues for this milestone are closed. You may close milestone now.
.back-link
= link_to project_milestones_path(@project) do
← To milestones list
- if @milestone.can_be_closed?
%hr
%p
%span All issues for this milestone are closed. You may close milestone now.
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove"
.ui-box.ui-box-show
.ui-box-head
......@@ -69,6 +60,11 @@
Participants
%span.badge= @users.count
.pull-right
= link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do
%i.icon-plus
New Issue
= link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link grouped"
.tab-content
.tab-pane.active#tab-issues
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment