summaryrefslogtreecommitdiff
path: root/app/views/shared/wikis/edit.html.haml
blob: 5bda8d85627968c31d1f8a345b5a7d66dfb7333e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- @content_class = "limit-container-width" unless fluid_layout
- add_to_breadcrumbs _("Wiki"), wiki_page_path(@wiki, @page)
- breadcrumb_title @page.persisted? ? _("Edit") : _("New")
- page_title @page.persisted? ? _("Edit") : _("New"), @page.human_title, _("Wiki")

= wiki_page_errors(@error)

.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row
  %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.human_title, wiki_page_path(@wiki, @page)
        %span.light
          ·
          = s_("Wiki|Edit Page")
      - else
        = s_("Wiki|Create New Page")

  .nav-controls.pb-md-3.pb-lg-0
    - if @page.persisted?
      = link_to wiki_page_path(@wiki, @page, action: :history), class: "btn" do
        = s_("Wiki|Page history")
      - if can?(current_user, :admin_wiki, @wiki.container)
        #delete-wiki-modal-wrapper{ data: { delete_wiki_url: wiki_page_path(@wiki, @page), page_title: @page.human_title } }

= render 'shared/wikis/form', uploads_path: wiki_attachment_upload_url

= render 'shared/wikis/sidebar'