summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-05-15 08:35:38 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-05-15 08:35:38 +0000
commitdee61df95cc07b6d4e34830a0097034c8995a90a (patch)
tree90b3cb4c7d7902b5211f8c64116d8c0454c28203 /app/views/projects
parent416a5450e4d8598e87f96f9edc57983502b42397 (diff)
parentf30de1bf431f5e668d0d296ca304c489ad8e2fcf (diff)
downloadgitlab-ce-dee61df95cc07b6d4e34830a0097034c8995a90a.tar.gz
Merge branch 'update-wiki-modal' into 'master'
Update wiki page deletion confirmation See merge request gitlab-org/gitlab-ce!18712
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/wikis/edit.html.haml11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml
index 9d3d4072027..35c7dc2984a 100644
--- a/app/views/projects/wikis/edit.html.haml
+++ b/app/views/projects/wikis/edit.html.haml
@@ -28,9 +28,16 @@
= link_to project_wiki_history_path(@project, @page), class: "btn" do
= s_("Wiki|Page history")
- if can?(current_user, :admin_wiki, @project)
- = link_to project_wiki_path(@project, @page), data: { confirm: s_("WikiPageConfirmDelete|Are you sure you want to delete this page?")}, method: :delete, class: "btn btn-danger" do
- = _("Delete")
+ %button.btn.btn-danger{ data: { toggle: 'modal',
+ target: '#delete-wiki-modal',
+ delete_wiki_url: project_wiki_path(@project, @page),
+ page_title: @page.title.capitalize },
+ id: 'delete-wiki-button',
+ type: 'button' }
+ = _('Delete')
= render 'form'
= render 'sidebar'
+
+#delete-wiki-modal.modal.fade