diff options
author | Hiroyuki Sato <h-sato@ruby-dev.jp> | 2016-10-27 23:23:58 +0900 |
---|---|---|
committer | Hiroyuki Sato <h-sato@ruby-dev.jp> | 2016-11-01 18:23:30 +0900 |
commit | 504282cf4c05a9fd9e70566c1dfcd56927f8c4e2 (patch) | |
tree | 1892b8031e27626ae8ab2df1092e03203094f0c9 | |
parent | b328c7885532ccff70e1f9f7dc970a8dde0c52d6 (diff) | |
download | gitlab-ce-504282cf4c05a9fd9e70566c1dfcd56927f8c4e2.tar.gz |
Fix edit button wiki
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 9 | ||||
-rw-r--r-- | app/views/projects/wikis/_main_links.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/wikis/edit.html.haml | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 6624d5cb427..4e41a15d9f4 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -33,7 +33,12 @@ .form-actions - if @page && @page.persisted? = f.submit 'Save changes', class: "btn-save btn" - = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel" + .pull-right + - if can?(current_user, :admin_wiki, @project) + = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger btn-grouped" do + Delete + = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel btn-grouped" - else = f.submit 'Create page', class: "btn-create btn" - = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, :home), class: "btn btn-cancel" + .pull-right + = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, :home), class: "btn btn-cancel" diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 4ea75dbbf0c..763c2fea39b 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -7,6 +7,3 @@ - if can?(current_user, :create_wiki, @project) = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do Edit - - if can?(current_user, :admin_wiki, @project) - = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-remove" do - Delete diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml index 233538bb488..679d6018bef 100644 --- a/app/views/projects/wikis/edit.html.haml +++ b/app/views/projects/wikis/edit.html.haml @@ -19,7 +19,5 @@ - 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' - = render 'form' |