gitlab-org--gitlab-foss/app/views/projects/wikis/edit.html.haml

37 lines
1.3 KiB
Text
Raw Normal View History

- @content_class = "limit-container-width limit-container-width-sm" unless fluid_layout
2017-09-27 13:13:29 -04:00
- page_title _("Edit"), @page.title.capitalize, _("Wiki")
2018-02-05 12:17:21 -05:00
= wiki_page_errors(@error)
2017-03-04 09:03:14 -05: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')
.nav-text
%h2.wiki-page-title
- if @page.persisted?
= link_to @page.title.capitalize, project_wiki_path(@project, @page)
- else
= @page.title.capitalize
%span.light
·
2016-06-15 10:31:41 -04:00
- if @page.persisted?
2017-09-27 13:13:29 -04:00
= s_("Wiki|Edit Page")
2016-06-15 10:31:41 -04:00
- else
2017-09-27 13:13:29 -04:00
= s_("Wiki|Create 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
2017-09-27 13:13:29 -04:00
= s_("Wiki|New page")
- if @page.persisted?
= link_to project_wiki_history_path(@project, @page), class: "btn" do
2017-09-27 13:13:29 -04:00
= s_("Wiki|Page history")
- if can?(current_user, :admin_wiki, @project)
2017-09-27 13:13:29 -04:00
= link_to project_wiki_path(@project, @page), data: { confirm: s_("WikiPageConfirmDelete|Are you sure you want to delete this page?")}, method: :delete, class: "btn btn-danger" do
= _("Delete")
= render 'form'
= render 'sidebar'