2011-10-08 23:36:38 +02:00
|
|
|
= form_for [:admin, @admin_project] do |f|
|
|
|
|
-if @admin_project.errors.any?
|
|
|
|
#error_explanation
|
2011-11-15 09:34:30 +01:00
|
|
|
%h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:"
|
2011-10-08 23:36:38 +02:00
|
|
|
%ul
|
|
|
|
- @admin_project.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
2012-01-29 22:59:12 +01:00
|
|
|
.clearfix
|
2011-11-07 19:38:54 +01:00
|
|
|
= f.label :name
|
2012-01-29 22:59:12 +01:00
|
|
|
.input= f.text_field :name
|
|
|
|
.clearfix
|
2011-11-07 19:38:54 +01:00
|
|
|
= f.label :code
|
2012-01-29 22:59:12 +01:00
|
|
|
.input= f.text_field :code
|
|
|
|
.clearfix
|
2011-11-07 19:38:54 +01:00
|
|
|
= f.label :path
|
2012-01-29 22:59:12 +01:00
|
|
|
.input= f.text_field :path
|
2011-11-07 19:38:54 +01:00
|
|
|
|
2012-01-29 22:59:12 +01:00
|
|
|
- unless @admin_project.new_record?
|
|
|
|
.clearfix
|
|
|
|
= f.label :owner_id
|
|
|
|
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
|
2011-11-07 19:38:54 +01:00
|
|
|
|
2012-01-29 22:59:12 +01:00
|
|
|
.clearfix
|
2011-11-07 19:38:54 +01:00
|
|
|
= f.label :description
|
2012-01-29 22:59:12 +01:00
|
|
|
.input= f.text_area :description
|
2011-10-08 23:36:38 +02:00
|
|
|
.clear
|
2011-11-21 08:26:10 +01:00
|
|
|
%br
|
2011-10-08 23:36:38 +02:00
|
|
|
.actions
|
2012-01-27 08:19:55 +01:00
|
|
|
= f.submit 'Save', :class => "btn"
|
2011-11-07 19:38:54 +01:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
|
|
|
taggifyForm();
|
2012-01-29 22:59:12 +01:00
|
|
|
$('#project_owner_id').chosen();
|
2011-11-15 09:34:30 +01:00
|
|
|
})
|