Commit 518eefcb authored by Constance Okoghenun's avatar Constance Okoghenun

Updated placement of milestone actions in milestone list

parent bee7f064
......@@ -12,7 +12,7 @@
border-radius: $border-radius-default;
background-color: $white-light;
&:not(:last-child){
&:not(:last-child) {
margin-bottom: $gl-padding-8;
}
......
......@@ -10,40 +10,14 @@
- else
%span - Project Milestone
.col-sm-6
.float-right.light #{milestone.percent_complete(current_user)}% complete
.row
.col-sm-6
.col-sm-4
= milestone_progress_bar(milestone)
= link_to pluralize(milestone.total_issues_count(current_user), 'Issue'), issues_path
·
= link_to pluralize(milestone.merge_requests.size, 'Merge Request'), merge_requests_path
.col-sm-6= milestone_progress_bar(milestone)
- if milestone.is_a?(GlobalMilestone) || milestone.group_milestone?
.row
.col-sm-6
- if milestone.legacy_group_milestone?
.expiration= render('shared/milestone_expired', milestone: milestone)
.projects
- milestone.milestones.each do |milestone|
= link_to milestone_path(milestone) do
%span.badge.badge-gray
= dashboard ? milestone.project.full_name : milestone.project.name
- if @group
.col-sm-6.milestone-actions
- if can?(current_user, :admin_milestones, @group)
- if milestone.group_milestone?
= link_to edit_group_milestone_path(@group, milestone), class: "btn btn-sm btn-grouped" do
Edit
\
- if milestone.closed?
= link_to 'Reopen Milestone', group_milestone_route(milestone, {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen"
- else
= link_to 'Close Milestone', group_milestone_route(milestone, {state_event: :close }), method: :put, class: "btn btn-sm btn-grouped btn-close"
.float-right.light #{milestone.percent_complete(current_user)}% complete
.col-sm-2
- if @project
.row
.col-sm-6
= render('shared/milestone_expired', milestone: milestone)
.col-sm-6.milestone-actions
- if can?(current_user, :admin_milestone, milestone.project) and milestone.active?
= link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-sm btn-grouped" do
......@@ -74,3 +48,30 @@
disabled: true }
= _('Delete')
= icon('spin spinner', class: 'js-loading-icon hidden' )
- if milestone.is_a?(GlobalMilestone) || milestone.group_milestone?
.row
.col-sm-6
- if milestone.legacy_group_milestone?
.expiration= render('shared/milestone_expired', milestone: milestone)
.projects
- milestone.milestones.each do |milestone|
= link_to milestone_path(milestone) do
%span.badge.badge-gray
= dashboard ? milestone.project.full_name : milestone.project.name
- if @group
.col-sm-6.milestone-actions
- if can?(current_user, :admin_milestones, @group)
- if milestone.group_milestone?
= link_to edit_group_milestone_path(@group, milestone), class: "btn btn-sm btn-grouped" do
Edit
\
- if milestone.closed?
= link_to 'Reopen Milestone', group_milestone_route(milestone, {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen"
- else
= link_to 'Close Milestone', group_milestone_route(milestone, {state_event: :close }), method: :put, class: "btn btn-sm btn-grouped btn-close"
- if @project
.row
.col-sm-6
= render('shared/milestone_expired', milestone: milestone)
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