2011-10-16 23:07:10 +02:00
|
|
|
%div
|
|
|
|
= form_for [@project, @snippet] do |f|
|
|
|
|
-if @snippet.errors.any?
|
|
|
|
%ul
|
|
|
|
- @snippet.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
|
|
|
%table.round-borders
|
|
|
|
%tr
|
|
|
|
%td= f.label :title
|
|
|
|
%td= f.text_field :title, :placeholder => "Example Snippet"
|
|
|
|
%tr
|
|
|
|
%td= f.label :file_name
|
|
|
|
%td= f.text_field :file_name, :placeholder => "example.rb"
|
2011-10-27 08:46:21 +02:00
|
|
|
%tr
|
|
|
|
%td= f.label "Lifetime"
|
2011-10-27 09:11:42 +02:00
|
|
|
%td= f.select :expires_at, lifetime_select_options
|
2011-10-16 23:07:10 +02:00
|
|
|
%tr
|
|
|
|
%td{:colspan => 2}
|
|
|
|
= f.label :content, "Code"
|
|
|
|
%br
|
2011-11-12 13:45:32 +01:00
|
|
|
%br
|
|
|
|
= f.text_area :content
|
2011-10-26 15:46:25 +02:00
|
|
|
|
2011-10-16 23:07:10 +02:00
|
|
|
.actions.prepend-top
|
2011-11-12 13:45:32 +01:00
|
|
|
= f.submit 'Save', :class => "button"
|