Commit 5aada8cc2adef82780e23b859aeabb71f7d1f5ca

Authored by Riyad Preukschas
1 parent e54246d3

Move wiki delete button to the edit page

app/views/wikis/edit.html.haml
1 %h3.page_title Editing page 1 %h3.page_title Editing page
2 %hr 2 %hr
3 = render 'form' 3 = render 'form'
  4 +
  5 +.right
  6 + - if can? current_user, :admin_wiki, @project
  7 + = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn small danger" do
  8 + Delete this page
4 \ No newline at end of file 9 \ No newline at end of file
app/views/wikis/show.html.haml
@@ -16,6 +16,3 @@ @@ -16,6 +16,3 @@
16 = markdown @wiki.content 16 = markdown @wiki.content
17 17
18 %p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago 18 %p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago
19 -- if can? current_user, :admin_wiki, @project  
20 - = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete do  
21 - Delete this page