_form.html.haml 912 Bytes
Newer Older
1
= form_for [@project, @wiki] do |f|
Valery Sizov's avatar
Valery Sizov committed
2 3 4 5 6 7 8
  -if @wiki.errors.any?
    #error_explanation
      %h2= "#{pluralize(@wiki.errors.count, "error")} prohibited this wiki from being saved:"
      %ul
        - @wiki.errors.full_messages.each do |msg|
          %li= msg

9 10 11
  .main_box
    .top_box_content
      = f.label :title
12
      .input= f.text_field :title, class: 'span8'
13 14 15 16
      = f.hidden_field :slug
    .middle_box_content
      .input
        %span.cgray
17 18
          Wiki content is parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
          To link to a (new) page you can just type
19
          %code [Link Title](page-slug)
20
          \.
21 22 23

    .bottom_box_content
      = f.label :content
24
      .input= f.text_area :content, class: 'span8'
Valery Sizov's avatar
Valery Sizov committed
25
  .actions
26 27
    = f.submit 'Save', class: "save-btn btn"
    = link_to "Cancel", project_wiki_path(@project, :index), class: "btn cancel-btn"