summaryrefslogtreecommitdiff
path: root/app/views/projects/wikis/_main_links.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/wikis/_main_links.html.haml')
-rw-r--r--app/views/projects/wikis/_main_links.html.haml10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml
index 763c2fea39b..3bbd8042c3a 100644
--- a/app/views/projects/wikis/_main_links.html.haml
+++ b/app/views/projects/wikis/_main_links.html.haml
@@ -1,9 +1,9 @@
- 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
- = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do
- Page History
- - if can?(current_user, :create_wiki, @project)
- = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do
+ New page
+ = link_to project_wiki_history_path(@project, @page), class: "btn" do
+ Page history
+ - if can?(current_user, :create_wiki, @project) && @page.latest?
+ = link_to project_wiki_edit_path(@project, @page), class: "btn js-wiki-edit" do
Edit