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 @@ ...@@ -10,6 +10,15 @@
- else - else
%span - Project Milestone %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 .col-sm-4
= milestone_progress_bar(milestone) = milestone_progress_bar(milestone)
= link_to pluralize(milestone.total_issues_count(current_user), 'Issue'), issues_path = link_to pluralize(milestone.total_issues_count(current_user), 'Issue'), issues_path
...@@ -17,8 +26,8 @@ ...@@ -17,8 +26,8 @@
= link_to pluralize(milestone.merge_requests.size, 'Merge Request'), merge_requests_path = link_to pluralize(milestone.merge_requests.size, 'Merge Request'), merge_requests_path
.float-right.light #{milestone.percent_complete(current_user)}% complete .float-right.light #{milestone.percent_complete(current_user)}% complete
.col-sm-2 .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 can?(current_user, :admin_milestone, milestone.project) and milestone.active?
- if @project.group - if @project.group
%button.js-promote-project-milestone-button.btn.btn-transparent.btn-sm.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'), %button.js-promote-project-milestone-button.btn.btn-transparent.btn-sm.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'),
...@@ -35,30 +44,15 @@ ...@@ -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" = 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? - unless milestone.active?
= link_to 'Reopen Milestone', project_milestone_path(@project, milestone, {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen" = link_to 'Reopen Milestone', project_milestone_path(@project, milestone, {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen"
- if @group
- 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 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? - if milestone.closed?
= link_to 'Reopen Milestone', group_milestone_route(milestone, {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen" = link_to 'Reopen Milestone', group_milestone_route(milestone, {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen"
- else - else
= link_to 'Close Milestone', group_milestone_route(milestone, {state_event: :close }), method: :put, class: "btn btn-sm btn-grouped btn-close" = 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 .row
.col-sm-6 .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