summaryrefslogtreecommitdiff
path: root/app/views/wikis/_form.html.haml
blob: 20b5b11281925139673885810a36038e7a3c6aa1 (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
= form_for [@project, @wiki] do |f|
  -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

  .main_box
    .top_box_content
      = f.label :title
      .input= f.text_field :title, :class => 'span8'
      = f.hidden_field :slug
    .middle_box_content
      .input
        %span.cgray
          Wiki content is parsed with #{link_to "Markdown", "http://en.wikipedia.org/wiki/Markdown"}.
          To add link to new page you can just type
          %code [Link Title](page-slug)

    .bottom_box_content
      = f.label :content
      .input= f.text_area :content, :class => 'span8'
  .actions
    = f.submit 'Save', :class => "primary btn"
    = link_to "Cancel", project_wiki_path(@project, :index), :class => "btn"