2015-02-28 17:28:05 +01:00
|
|
|
= form_for @orga do |f|
|
2015-07-25 18:32:27 +02:00
|
|
|
- if @orga.persisted?
|
|
|
|
= hidden_field_tag :secret, params[:secret]
|
|
|
|
|
2015-02-28 17:28:05 +01:00
|
|
|
- if @orga.errors.any?
|
|
|
|
#flash_messages
|
|
|
|
- @orga.errors.full_messages.each do |msg|
|
|
|
|
%p.flash.alert= msg
|
|
|
|
|
|
|
|
.field.kind
|
|
|
|
= f.label :kind
|
|
|
|
%span.radios
|
|
|
|
- Kind.all.each do |kind|
|
|
|
|
= f.radio_button :kind_id, kind.id
|
|
|
|
= f.label "kind_id_#{kind.id}" do
|
|
|
|
%em.fa{ class: "fa-#{kind.icon}" }
|
|
|
|
= Kind.human_attribute_name "name_#{kind.name}"
|
|
|
|
.field.name
|
|
|
|
= f.label :name
|
|
|
|
= f.text_field :name, required: true
|
2015-12-26 23:32:04 +01:00
|
|
|
.field.description
|
|
|
|
= f.label :description
|
|
|
|
= f.text_area :description, rows: 25, class: :description
|
2016-04-09 16:06:22 +02:00
|
|
|
.field.place_name
|
|
|
|
= f.label :place_name
|
|
|
|
= f.text_field :place_name
|
|
|
|
.field.address
|
|
|
|
.helper
|
|
|
|
:markdown
|
|
|
|
#{t '.address_helper'}
|
|
|
|
= f.label :address
|
|
|
|
= f.text_field :address
|
2015-02-28 17:28:05 +01:00
|
|
|
.field.city
|
|
|
|
= f.label :city
|
|
|
|
= f.text_field :city, list: :cities
|
|
|
|
%datalist#cities
|
|
|
|
- Event.group(:city).order('count(city) desc').pluck(:city).each do |city|
|
|
|
|
%option= city
|
|
|
|
.field.department
|
|
|
|
= f.label :department
|
|
|
|
= f.text_field :department
|
|
|
|
.field.region
|
|
|
|
= f.label :region
|
|
|
|
= f.collection_select :region_id, Region.all, :id, :name
|
|
|
|
|
|
|
|
.field.url
|
|
|
|
.helper
|
|
|
|
:markdown
|
|
|
|
#{t '.url_helper'}
|
|
|
|
= f.label :url
|
|
|
|
= f.url_field :url, placeholder: 'Ex: http://april.org'
|
2016-01-07 22:20:09 +01:00
|
|
|
.field.diaspora
|
|
|
|
= f.label :diaspora
|
|
|
|
= f.url_field :diaspora
|
2015-02-28 17:28:05 +01:00
|
|
|
.field.feed
|
|
|
|
.helper
|
|
|
|
:markdown
|
|
|
|
#{t '.feed_helper'}
|
|
|
|
= f.label :feed
|
|
|
|
= f.url_field :feed, placeholder: 'Ex: http://april.org/index.rss'
|
|
|
|
.field.contact
|
|
|
|
.helper
|
|
|
|
:markdown
|
|
|
|
#{t '.contact_helper'}
|
|
|
|
= f.label :contact
|
|
|
|
= f.email_field :contact
|
|
|
|
.field.submitter
|
|
|
|
.helper
|
|
|
|
:markdown
|
|
|
|
#{t '.submitter_helper'}
|
|
|
|
= f.label :submitter
|
|
|
|
= f.email_field :submitter
|
2016-01-04 00:49:52 +01:00
|
|
|
|
|
|
|
.field.tags
|
|
|
|
.helper
|
|
|
|
:markdown
|
|
|
|
#{t '.tags_helper'}
|
|
|
|
= f.label :tags
|
2016-12-17 16:59:11 +01:00
|
|
|
= f.text_field :tag_list, value: f.object.tag_list.to_s
|
2016-01-04 00:49:52 +01:00
|
|
|
|
2015-12-26 23:32:04 +01:00
|
|
|
.field.active
|
|
|
|
= f.label :active
|
|
|
|
= f.check_box :active
|
2015-02-28 17:28:05 +01:00
|
|
|
|
|
|
|
.actions
|
|
|
|
= f.button do
|
|
|
|
%em.fa.fa-check
|
|
|
|
= t '.save'
|