2017-06-12 07:47:46 -04:00
- @content_class = "limit-container-width limit-container-width-sm" unless fluid_layout
2015-12-02 07:59:42 -05:00
- page_title "Edit", @page.title.capitalize, "Wiki"
2016-02-07 11:57:28 -05:00
2017-07-23 08:26:02 -04:00
- if @conflict
.alert.alert-danger
Someone edited the page the same time you did. Please check out
2017-07-26 08:22:43 -04:00
= link_to "the page", project_wiki_path(@project, @page), target: "_blank"
2017-07-23 08:26:02 -04:00
and make sure your changes will not unintentionally remove theirs.
2017-03-04 09:03:14 -05:00
2017-06-12 07:47:46 -04:00
.wiki-page-header.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left')
2016-11-14 16:33:21 -05:00
2017-06-12 07:47:46 -04:00
.nav-text
%h2.wiki-page-title
- if @page.persisted?
2017-06-29 13:06:35 -04:00
= link_to @page.title.capitalize, project_wiki_path(@project, @page)
2017-06-12 07:47:46 -04:00
- else
= @page.title.capitalize
%span.light
·
2016-06-15 10:31:41 -04:00
- if @page.persisted?
2017-06-12 07:47:46 -04:00
Edit Page
2016-06-15 10:31:41 -04:00
- else
2017-06-12 07:47:46 -04:00
Create Page
2016-02-07 11:57:28 -05:00
2017-06-12 07:47:46 -04:00
.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.persisted?
2017-06-29 13:06:35 -04:00
= link_to project_wiki_history_path(@project, @page), class: "btn" do
2017-06-12 07:47:46 -04:00
Page history
- if can?(current_user, :admin_wiki, @project)
2017-06-29 13:06:35 -04:00
= link_to project_wiki_path(@project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger" do
2017-06-12 07:47:46 -04:00
Delete
2013-01-11 14:03:43 -05:00
2017-06-12 07:47:46 -04:00
= render 'form'
2016-11-14 16:33:21 -05:00
= render 'sidebar'