_form.html.haml 593 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

Valery Sizov's avatar
Valery Sizov committed
9
  .clearfix
Valery Sizov's avatar
Valery Sizov committed
10
    = f.label :title
Valery Sizov's avatar
Valery Sizov committed
11
    .input= f.text_field :title, :class => :xxlarge
12
    = f.hidden_field :slug
Valery Sizov's avatar
Valery Sizov committed
13
  .clearfix
Valery Sizov's avatar
Valery Sizov committed
14
    = f.label :content
Valery Sizov's avatar
Valery Sizov committed
15
    .input= f.text_area :content, :class => :xxlarge
Valery Sizov's avatar
Valery Sizov committed
16
  .actions
Valery Sizov's avatar
Valery Sizov committed
17 18
    = f.submit 'Save', :class => "primary btn"
    = link_to "Cancel", project_wiki_path(@project, :index), :class => "btn"