Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

75 lines
3.8 KiB

- add_stylesheet :editor
- add_inline_script :pen
- add_inline_script :markdown
- add_inline_script :editor
-#= render 'conferences/page_header', :page_key => (@workshop.id.present? ? 'Edit_Workshop' : 'Create_Workshop')
= render 'conferences/page_header', :page_key => 'Conference_Registration'
%article
= row do
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
= columns(medium: 12) do
- if @workshop.id.present?
= hidden_field_tag :workshop_id, @workshop.id
- if @is_translating
%h2=_(@page_title, vars: @page_title_vars)
= hidden_field_tag :translation, @translation
- else
%h2=_@page_title, :t
- else
%h2=_@page_title, :t
= textfield :title, @title, required: true, lang: @translation, big: true, original_value: @is_translating ? @workshop.title! : nil, original_lang: @workshop.locale
= textarea :info, @info, help: 'articles.workshops.paragraphs.info', lang: @translation, original_value: @is_translating ? richtext(@workshop.info!, 4).html_safe : nil, original_lang: @workshop.locale
- if !@is_translating && (@workshop.id.blank? || @can_edit)
= columns(medium: 6) do
%h3=_'articles.workshops.headings.languages','Workshop Language'
.input-field-help=_'articles.workshops.paragraphs.languages', :s, 2
.check-box-field.vertical.input-field
- [:en, :es, :fr].each do |language|
= check_box_tag "languages[#{language}]", 1, @languages && @languages.include?(language)
= label_tag "languages_#{language}" do
= _"languages.#{language}"
%h3=_'articles.workshops.headings.theme','Theme'
.input-field-help=_'articles.workshops.paragraphs.theme', :s, 2
- theme_found = false
.check-box-field.vertical.input-field
- Workshop.all_themes.each do |theme|
- is_selected = (@workshop.theme.to_s == theme.to_s)
- theme_found ||= is_selected
= radio_button_tag :theme, theme, is_selected
= label_tag "theme_#{theme}" do
= _"workshop.options.theme.#{theme}"
- is_other = (@workshop.theme.present? && !theme_found)
= radio_button_tag :theme, :other, is_other
= label_tag "theme_other" do
.other
= text_field_tag :other_theme, (is_other ? @workshop.theme : nil), placeholder: (_"workshop.options.theme.other"), required: is_other
= columns(medium: 6) do
%h3=_'articles.workshops.headings.needs','What do you need?'
.input-field-help=_'articles.workshops.paragraphs.needs', :s, 2
.check-box-field.vertical.input-field
- [:sound, :projector, :tools].each do |need|
= check_box_tag "needs[#{need.to_s}]", 1, JSON.parse(@workshop.needs || '[]').include?(need.to_s)
= label_tag "needs_#{need}" do
= _"workshop.options.needs.#{need.to_s}"
%h3=_'articles.workshops.headings.space','Type of space'
.input-field-help=_'articles.workshops.paragraphs.space', :s, 2
.check-box-field.vertical.input-field
- [:meeting_room, :workshop, :outdoor_meeting].each do |space|
= radio_button_tag :space, space, @workshop.space == space
= label_tag "space_#{space}" do
= _"workshop.options.space.#{space}"
%h3=_'articles.workshops.headings.needs_facilitators','Looking for help?'
.input-field-help=_'articles.workshops.paragraphs.needs_facilitators', :s, 2
.check-box-field.vertical.input-field
= check_box_tag :needs_facilitators, 1, @workshop.needs_facilitators
= label_tag :needs_facilitators do
= _'workshop.options.needs_facilitators', 'Needs Additional Facilitators'
= columns(medium: 12) do
= textarea :notes, @workshop.notes, warning: 'articles.workshops.paragraphs.notes'
= columns(medium: 12) do
.actions.next-prev
= button_tag :save, value: :save
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true