snippets are ready
This commit is contained in:
parent
526ad466c8
commit
9265de3d25
28 changed files with 366 additions and 8 deletions
22
app/views/snippets/_form.html.haml
Normal file
22
app/views/snippets/_form.html.haml
Normal file
|
@ -0,0 +1,22 @@
|
|||
%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"
|
||||
%tr
|
||||
%td{:colspan => 2}
|
||||
= f.label :content, "Code"
|
||||
%br
|
||||
= f.text_area :content, :style => "height:240px;width:932px;"
|
||||
|
||||
.actions.prepend-top
|
||||
= f.submit 'Save', :class => "lbutton vm"
|
Loading…
Add table
Add a link
Reference in a new issue