Commit d2daa618 authored by Constance Okoghenun's avatar Constance Okoghenun

Update milestone actions placement for group milestones in milestones list

parent 2a638c42
......@@ -10,6 +10,15 @@
- else
%span - Project Milestone
- if @project || milestone.is_a?(GlobalMilestone) || milestone.group_milestone?
= render('shared/milestone_expired', milestone: milestone)
- if milestone.legacy_group_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
.col-sm-4
= milestone_progress_bar(milestone)
= link_to pluralize(milestone.total_issues_count(current_user), 'Issue'), issues_path
......@@ -17,8 +26,8 @@
= link_to pluralize(milestone.merge_requests.size, 'Merge Request'), merge_requests_path
.float-right.light #{milestone.percent_complete(current_user)}% complete
.col-sm-2
- if @project
.milestone-actions.d-flex.justify-content-sm-start.justify-content-md-end
.milestone-actions.d-flex.justify-content-sm-start.justify-content-md-end
- if @project
- if can?(current_user, :admin_milestone, milestone.project) and milestone.active?
- if @project.group
%button.js-promote-project-milestone-button.btn.btn-transparent.btn-sm.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'),
......@@ -35,30 +44,15 @@
= link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-sm btn-close btn-grouped"
- unless milestone.active?
= link_to 'Reopen Milestone', project_milestone_path(@project, milestone, {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen"
- 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 @group
- 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
- if milestone.is_a?(GlobalMilestone) || milestone.group_milestone?
.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