Made the form require login and look slightly prettier.

This commit is contained in:
Skud
2012-12-05 21:11:48 +11:00
parent 87ef580b78
commit ea4c2b028f

View File

@@ -1,9 +1,11 @@
= content_for :title, "Edit garden"
- if user_signed_in?
= form_for @garden do |f|
= label_tag :name, "Name"
= f.text_field :name
= f.submit "Save"
= form_for @garden, :html => {:class => "form-horizontal"} do |f|
.control-group
= f.label :name, :class => "control-label"
.controls= f.text_field :name
.form-actions
= f.submit "Save", :class => 'btn'
- else
.alert You're not logged in. Only logged in users can do this.