Fix edit button wiki
This commit is contained in:
parent
b328c78855
commit
504282cf4c
3 changed files with 7 additions and 7 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue