Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-06-27 20:29:03 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-28 23:47:00 +0300
commita688eaddc22cd1cc4e466a0b826c15a528a4beb7 (patch)
tree94c38ffd0a28cbf116d796287c609a6695addfdf
parenta64b7cd3ba3ad619599ae7682aba89fa301b0a2b (diff)
Merge branch '19075-new-wiki' into 'master'
Remove duplicate new page btn from edit wiki ## What does this MR do? Removes duplicate button on wiki page ## What are the relevant issue numbers? Closes #19075 ## Screenshots (if relevant) ![Screen_Shot_2016-06-24_at_9.45.28_AM](/uploads/8dca96c3e75b428d63acaaba6dede9a6/Screen_Shot_2016-06-24_at_9.45.28_AM.png) ![Screen_Shot_2016-06-24_at_9.45.57_AM](/uploads/e6ea97b07e48d2fe6f108d8c5a943583/Screen_Shot_2016-06-24_at_9.45.57_AM.png) See merge request !4904 (cherry picked from commit 121c5c837fdf9b001fa80f9395cd327af17e5a9f)
-rw-r--r--app/views/projects/wikis/edit.html.haml7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml
index bf5d09d50c2..817bf9b3f69 100644
--- a/app/views/projects/wikis/edit.html.haml
+++ b/app/views/projects/wikis/edit.html.haml
@@ -15,9 +15,10 @@
Edit Page
.nav-controls
- - 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
+ - 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'