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

Updated placement of milestone actions in milestone list

parent bee7f064
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
border-radius: $border-radius-default; border-radius: $border-radius-default;
background-color: $white-light; background-color: $white-light;
&:not(:last-child){ &:not(:last-child) {
margin-bottom: $gl-padding-8; margin-bottom: $gl-padding-8;
} }
......
...@@ -10,14 +10,45 @@ ...@@ -10,14 +10,45 @@
- else - else
%span - Project Milestone %span - Project Milestone
.col-sm-6 .col-sm-4
.float-right.light #{milestone.percent_complete(current_user)}% complete = milestone_progress_bar(milestone)
.row
.col-sm-6
= link_to pluralize(milestone.total_issues_count(current_user), 'Issue'), issues_path = link_to pluralize(milestone.total_issues_count(current_user), 'Issue'), issues_path
· ·
= link_to pluralize(milestone.merge_requests.size, 'Merge Request'), merge_requests_path = link_to pluralize(milestone.merge_requests.size, 'Merge Request'), merge_requests_path
.col-sm-6= milestone_progress_bar(milestone) .float-right.light #{milestone.percent_complete(current_user)}% complete
.col-sm-2
- if @project
.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
Edit
\
- if @project.group
%button.js-promote-project-milestone-button.btn.btn-sm.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'),
disabled: true,
type: 'button',
data: { url: promote_project_milestone_path(milestone.project, milestone),
milestone_title: milestone.title,
group_name: @project.group.name,
target: '#promote-milestone-modal',
container: 'body',
toggle: 'modal' } }
= _('Promote')
= 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"
%button.js-delete-milestone-button.btn.btn-sm.btn-grouped.btn-danger{ data: { toggle: 'modal',
target: '#delete-milestone-modal',
milestone_id: milestone.id,
milestone_title: markdown_field(milestone, :title),
milestone_url: project_milestone_path(milestone.project, milestone),
milestone_issue_count: milestone.issues.count,
milestone_merge_request_count: milestone.merge_requests.count },
disabled: true }
= _('Delete')
= icon('spin spinner', class: 'js-loading-icon hidden' )
- if milestone.is_a?(GlobalMilestone) || milestone.group_milestone? - if milestone.is_a?(GlobalMilestone) || milestone.group_milestone?
.row .row
.col-sm-6 .col-sm-6
...@@ -44,33 +75,3 @@ ...@@ -44,33 +75,3 @@
.row .row
.col-sm-6 .col-sm-6
= render('shared/milestone_expired', milestone: milestone) = 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
Edit
\
- if @project.group
%button.js-promote-project-milestone-button.btn.btn-sm.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'),
disabled: true,
type: 'button',
data: { url: promote_project_milestone_path(milestone.project, milestone),
milestone_title: milestone.title,
group_name: @project.group.name,
target: '#promote-milestone-modal',
container: 'body',
toggle: 'modal' } }
= _('Promote')
= 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"
%button.js-delete-milestone-button.btn.btn-sm.btn-grouped.btn-danger{ data: { toggle: 'modal',
target: '#delete-milestone-modal',
milestone_id: milestone.id,
milestone_title: markdown_field(milestone, :title),
milestone_url: project_milestone_path(milestone.project, milestone),
milestone_issue_count: milestone.issues.count,
milestone_merge_request_count: milestone.merge_requests.count },
disabled: true }
= _('Delete')
= icon('spin spinner', class: 'js-loading-icon hidden' )
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