Commit 5aada8cc2adef82780e23b859aeabb71f7d1f5ca
1 parent
e54246d3
Exists in
master
and in
4 other branches
Move wiki delete button to the edit page
Showing
2 changed files
with
5 additions
and
3 deletions
Show diff stats
app/views/wikis/edit.html.haml
1 | 1 | %h3.page_title Editing page |
2 | 2 | %hr |
3 | 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 | 9 | \ No newline at end of file | ... | ... |
app/views/wikis/show.html.haml
... | ... | @@ -16,6 +16,3 @@ |
16 | 16 | = markdown @wiki.content |
17 | 17 | |
18 | 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 | ... | ... |