summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-01-25 11:41:02 +0000
committerPhil Hughes <me@iamphill.com>2018-01-25 11:41:02 +0000
commitf9b946c1c9756533fd95c8735803d7b54d6dd204 (patch)
treeeca4c5df39f3007d80b18b21ab15ea0a6264176e /app/views/projects
parentb2c2d10c42b7a153477e9e806d3c0d4fd3223a9f (diff)
parentb8506500f9d0c3314ff1faf23e16e1e4940fec9e (diff)
downloadgitlab-ce-f9b946c1c9756533fd95c8735803d7b54d6dd204.tar.gz
Merge branch 'winh-delete-milestone-modal' into 'master'
Add modal for deleting a milestone Closes #41314 See merge request gitlab-org/gitlab-ce!16229
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/milestones/index.html.haml2
-rw-r--r--app/views/projects/milestones/show.html.haml14
2 files changed, 14 insertions, 2 deletions
diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml
index fcbf7cb802b..6a7bc4b1888 100644
--- a/app/views/projects/milestones/index.html.haml
+++ b/app/views/projects/milestones/index.html.haml
@@ -12,6 +12,8 @@
New milestone
.milestones
+ #delete-milestone-modal
+
%ul.content-list
= render @milestones
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 5dd4d2c949c..623c42ba88e 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -35,8 +35,18 @@
- else
= link_to 'Reopen milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"
- = link_to project_milestone_path(@project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-danger" do
- Delete
+ %button.js-delete-milestone-button.btn.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(@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' )
+
+ #delete-milestone-modal
%a.btn.btn-default.btn-grouped.pull-right.visible-xs-block.js-sidebar-toggle{ href: "#" }
= icon('angle-double-left')