summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone <annabel.dunstone@gmail.com>2016-06-24 14:44:02 -0500
committerAnnabel Dunstone <annabel.dunstone@gmail.com>2016-06-27 09:16:03 -0500
commit550e3f8e5d17c5cb89761bf502779b78c9c4f337 (patch)
treed977efb1b3ce7c4d9549a003d17126e265b2c1b8
parent2baef8a06e43ffaca1fd481bfa4a39bf106cb7c2 (diff)
downloadgitlab-ce-19075-new-wiki.tar.gz
Add conditional for new pag link19075-new-wiki
-rw-r--r--app/views/projects/wikis/edit.html.haml4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml
index af9d23bbfb3..817bf9b3f69 100644
--- a/app/views/projects/wikis/edit.html.haml
+++ b/app/views/projects/wikis/edit.html.haml
@@ -15,6 +15,10 @@
Edit Page
.nav-controls
+ - if !(@page && @page.persisted?)
+ - if can?(current_user, :create_wiki, @project)
+ = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
+ New Page
= render 'main_links'