Ready to merge
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
- content_for :banner do
|
||||
- image = image_url(image_file || 'empty-racks.jpg')
|
||||
- style = nil
|
||||
- cover = nil
|
||||
- figure = nil
|
||||
- if capable_of(:css_mixblendmode) || ENV['RAILS_ENV'] == 'test'
|
||||
- cover = "<div class=\"cover\" style=\"background-image: url(#{image})\"></div>"
|
||||
- elsif capable_of(:svg)
|
||||
- banner_image = 'application/banner_image.svg'
|
||||
- else
|
||||
- style = "background-image: url(#{image})"
|
||||
#header-title.short{style: style}
|
||||
= (render banner_image, {:image => image}) if banner_image
|
||||
= cover.html_safe if cover
|
||||
%h1=_(@page_title || "page_titles.#{page_group.to_s}.#{page_key.to_s}")
|
||||
@@ -0,0 +1,12 @@
|
||||
.policy-agreement
|
||||
- if @is_policy_page
|
||||
%h2=_'articles.policy.headings.The_Agreement'
|
||||
- else
|
||||
%h3=_'articles.policy.headings.The_Agreement'
|
||||
%ul
|
||||
- [:commitment, :respect, :empowerment, :accessible, :peaceful, :spaces, :hearing, :intent, :open_minds, :learning].each do |term|
|
||||
%li=_"articles.policy.term.#{term.to_s}", :s, 2
|
||||
%h3=_'articles.policy.headings.Why','Why have a Safer Space Agreement?'
|
||||
%p=_'articles.policy.paragraphs.Why', :p
|
||||
%h3=_'articles.policy.headings.How','How is the policy enforced?'
|
||||
%p=_'articles.policy.paragraphs.How', :p
|
||||
@@ -0,0 +1,6 @@
|
||||
%article
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Confirm_You_Email_Address','Confirm Email Address'
|
||||
= columns(medium: 6, large: 5) do
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
= button_tag :continue, :value => :confirm_email
|
||||
@@ -0,0 +1,50 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Youre_Done', 'You\'re Done!'
|
||||
= columns(medium: 6, large: 7) do
|
||||
%p=_'articles.conference_registration.paragraphs.done', :p
|
||||
%p=_'articles.conference_registration.paragraphs.workshops', 'You can now take a look at proposed workshops and even propose one yourself if you like.'
|
||||
.actions
|
||||
= link_to (_'articles.conference_registration.actions.View_Workshops'), workshops_path(@conference.slug), :class => 'button'
|
||||
= columns(medium: 6, large: 5) do
|
||||
%h3=_'articles.conference_registration.headings.Your_Registration'
|
||||
%table
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.name'
|
||||
%td=_!current_user.firstname
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.location'
|
||||
%td=_!@registration.city
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.arrival'
|
||||
%td=date(@registration.arrival)
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.departure'
|
||||
%td=date(@registration.departure)
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.languages'
|
||||
%td=_!((JSON.parse(@registration.languages).map { |x| _"languages.#{x}" }).join(', ').to_s).html_safe
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.housing'
|
||||
%td=_"articles.conference_registration.questions.housing.#{@registration.housing}"
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.bike'
|
||||
%td=_"articles.conference_registration.questions.bike.#{@registration.bike}"
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.food'
|
||||
%td=_"articles.conference_registration.questions.food.#{@registration.food}"
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.allergies'
|
||||
%td
|
||||
- if @registration.allergies.blank?
|
||||
=_'articles.conference_registration.none'
|
||||
- else
|
||||
=_!@registration.allergies
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.other'
|
||||
%td=_!@registration.other
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.payment'
|
||||
%td=_!('$' + @amount)
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions
|
||||
= button_tag :edit_registration, :value => :register
|
||||
@@ -0,0 +1,6 @@
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.email_confirm','Please confirm your email address'
|
||||
= columns(medium: 12) do
|
||||
=paragraph _('articles.conference_registration.paragraphs.email_confirm', :p)
|
||||
@@ -0,0 +1 @@
|
||||
= render :partial => 'application/header', :locals => {:page_group => :conferences, :page_key => page_key, :image_file => @conference.poster_url}
|
||||
@@ -0,0 +1,20 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Payment'
|
||||
%p=_'articles.conference_registration.paragraphs.Payment', 'Thank you for completing your registration. We\'ll see you at Bike!Bike! Payment is by donation and can be done now or upon arrival but to help us fund the conference, we ask that you pay the registration donation as soon as you can.'
|
||||
= columns(large: 9, push: 1) do
|
||||
= form_tag register_path(@this_conference.slug), :class => :payment do
|
||||
= hidden_field_tag :button, :payment
|
||||
.three-options
|
||||
= button_tag :amount_25, :name => :amount, :value => '25.0' do
|
||||
=_! '$25.00'
|
||||
= button_tag :amount_50, :name => :amount, :value => '50.0' do
|
||||
=_! '$50.00'
|
||||
= button_tag :amount_100, :name => :amount, :value => '100.0' do
|
||||
= _!'$100.00'
|
||||
= form_tag register_path(@this_conference.slug), :class => :payment do
|
||||
%span.currency=_!'$'
|
||||
= number_field_tag :amount, nil, :required => true, :step => 0.01, :min => 0.00
|
||||
= button_tag :custom_amount, :value => :payment
|
||||
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
|
||||
|
||||
= columns(large: 2)
|
||||
@@ -0,0 +1,5 @@
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.conference_registration.headings.payment_confirm','Please confirm your payment'
|
||||
%p=_'articles.conference_registration.paragraphs.payment_confirm',"You are about to confirm your payment of $ #{@amount} USD for registration.", vars: {:amount => @amount}
|
||||
= form_tag register_path(@this_conference.slug), :class => :payment do
|
||||
= button_tag :confirm_amount, :value => :paypal_confirmed
|
||||
@@ -0,0 +1,10 @@
|
||||
%article
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Policy_Agreement'
|
||||
%p=_'articles.conference_registration.paragraphs.Policy_Agreement', :s, 2
|
||||
= columns(medium: 10, push: 1) do
|
||||
= render 'application/policy'
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.conference_registration.paragraphs.Confirm_Agreement', :p
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions= button_tag :agree, :value => :policy
|
||||
@@ -0,0 +1,72 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Registration_Info','Registration Info'
|
||||
= columns(medium: 5, large: 4) do
|
||||
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p
|
||||
= columns(medium: 7, large: 8) do
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
%h3=_'articles.conference_registration.headings.name','What is your name?'
|
||||
.text-field.input-field
|
||||
= label_tag :name
|
||||
= text_field_tag :name, @name, required: true
|
||||
%h3=_'articles.conference_registration.headings.location','Where are you coming from?'
|
||||
.text-field.input-field
|
||||
= label_tag :location
|
||||
= text_field_tag :location, @registration.city, required: true
|
||||
%h3=_'articles.conference_registration.headings.arrival_and_departure','How long do you plan to spend in the area?'
|
||||
.date-span.input-field
|
||||
.date-labels
|
||||
= label_tag :arrival
|
||||
= label_tag :departure
|
||||
.date-field.input-field
|
||||
= datetime_local_field_tag :arrival, @registration.arrival.strftime("%Y-%m-%dT%T")
|
||||
= datetime_local_field_tag :departure, @registration.departure.strftime("%Y-%m-%dT%T")
|
||||
%h3=_'articles.conference_registration.headings.languages','Which languages do you speak?'
|
||||
.check-box-field.input-field
|
||||
- [:en, :es, :fr].each do |language|
|
||||
= check_box_tag "languages[#{language}]", 1, @languages.include?(language)
|
||||
= label_tag "languages_#{language}" do
|
||||
= _"languages.#{language}"
|
||||
%h3=_'articles.conference_registration.headings.housing','Do you need a place to stay?'
|
||||
.radio-button-field.input-field
|
||||
- [:none, :tent, :house].each do |option|
|
||||
= radio_button_tag :housing, option, (@registration.housing || '').to_sym == option, required: true
|
||||
= label_tag "housing_#{option}" do
|
||||
- option_name = _"articles.conference_registration.questions.housing.#{option}"
|
||||
= svg_sprite('icons', "bb-#{option}", option_name)
|
||||
= option_name
|
||||
%h3=_'articles.conference_registration.headings.bike','Do you need a bike?'
|
||||
.radio-button-field.input-field
|
||||
- [:none, :small, :medium, :large].each do |option|
|
||||
= radio_button_tag :bike, option, (@registration.bike || '').to_sym == option, required: true
|
||||
= label_tag "bike_#{option}" do
|
||||
- option_name = _"articles.conference_registration.questions.bike.#{option}"
|
||||
= svg_sprite('icons', "bb-#{option == :none ? :none : :bike}", option_name)
|
||||
= option_name
|
||||
%h3=_'articles.conference_registration.headings.food','What are your eating habits?'
|
||||
.radio-button-field.input-field
|
||||
= radio_button_tag :food, :meat, (@registration.food || '').to_sym == :meat, required: true
|
||||
= label_tag :food_meat do
|
||||
- option_name = _"articles.conference_registration.questions.food.meat"
|
||||
= svg_sprite('icons', 'bb-meat', option_name)
|
||||
= option_name
|
||||
= radio_button_tag :food, :vegetarian, (@registration.food || '').to_sym == :vegetarian, required: true
|
||||
= label_tag :food_vegetarian do
|
||||
- option_name = _"articles.conference_registration.questions.food.vegetarian"
|
||||
= svg_sprite('icons', 'bb-meat', 'meat')
|
||||
= svg_sprite('icons', 'bb-none', option_name)
|
||||
= option_name
|
||||
= radio_button_tag :food, :vegan, (@registration.food || '').to_sym == :vegan, required: true
|
||||
= label_tag :food_vegan do
|
||||
- option_name = _"articles.conference_registration.questions.food.vegan"
|
||||
= svg_sprite('icons', 'bb-milk', 'milk')
|
||||
= svg_sprite('icons', 'bb-none', option_name)
|
||||
= option_name
|
||||
%h3=_'articles.conference_registration.headings.allergies','Do you have any allergies?'
|
||||
.text-field.input-field
|
||||
= label_tag :allergies
|
||||
= text_field_tag :allergies, @registration.allergies
|
||||
%h3=_'articles.conference_registration.headings.other','Anything else we should know about your visit?'
|
||||
.select-field.input-field
|
||||
= label_tag :other
|
||||
= text_area_tag :other, @registration.other
|
||||
= button_tag :register, :value => :save
|
||||
@@ -0,0 +1,59 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Stats'
|
||||
%p=_'articles.conference_registration.paragraphs.Stats', :p
|
||||
= columns(medium: 6) do
|
||||
%ul.stats
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Total_Registrations'
|
||||
.stat.important=_!@total_registrations
|
||||
%li.money
|
||||
%h3=_'articles.conference_registration.terms.Total_Donations'
|
||||
.stat=money @total_donations
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Donation_Count'
|
||||
.stat
|
||||
= _!"#{@donation_count} / #{@total_registrations}"
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Housing'
|
||||
.breakdown
|
||||
- @housing.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.housing.#{h}"
|
||||
.stat=_!v
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Bikes'
|
||||
.breakdown
|
||||
.stat=_!"#{@bike_count} / #{@total_registrations}"
|
||||
- @bikes.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.bikes.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @bike_count)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Food'
|
||||
.breakdown
|
||||
- @food.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.food.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Languages'
|
||||
.breakdown
|
||||
- @languages.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"languages.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
= columns(medium: 6) do
|
||||
.allergies
|
||||
%h3=_'articles.conference_registration.headings.Allergies'
|
||||
%ul
|
||||
- @allergies.each do |a|
|
||||
%li
|
||||
%p=_!a
|
||||
.other
|
||||
%h3=_'articles.conference_registration.headings.other'
|
||||
%ul
|
||||
- @other.each do |o|
|
||||
%li
|
||||
%p=_!o
|
||||
@@ -0,0 +1,42 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Workshops','Workshops'
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.conference_registration.headings.Add_Workshop'
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.text-field.input-field
|
||||
= text_field_tag :title, nil, required: true
|
||||
= label_tag :title
|
||||
= text_area_tag :info, nil, required: true
|
||||
= button_tag :add
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.conference_registration.headings.Your_Workshops'
|
||||
%ul.workshops.my-workshops
|
||||
- @my_workshops.each do |workshop|
|
||||
%li
|
||||
%h4=workshop[:title]
|
||||
.info
|
||||
%h5{:contenteditable => true}=workshop[:title]
|
||||
%p{:contenteditable => true}=workshop[:info]
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
= button_tag :save, :value => :save
|
||||
= button_tag :delete, :value => :delete
|
||||
= button_tag :cancel, :value => :cancel
|
||||
= columns(medium: 12) do
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
= button_tag :previous, :value => :registration
|
||||
= button_tag :next, :value => :workshops
|
||||
:javascript
|
||||
function makeWorkshopsClickable() {
|
||||
var workshops = document.querySelectorAll('ul.workshops h4');
|
||||
for (var i = 0; i < workshops.length; i++) {
|
||||
workshops[i].addEventListener('click', function(e) {
|
||||
var workshop = e.target.parentElement;
|
||||
workshop.className = 'view';
|
||||
workshop.querySelector('form').onsubmit = function() {
|
||||
workshop.removeAttribute('class');
|
||||
return false;
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
makeWorkshopsClickable();
|
||||
@@ -0,0 +1,35 @@
|
||||
= render 'page_header', :page_key => 'Email_Participants'
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @email_sent == :yes
|
||||
%p=_('articles.conference_registration.paragraphs.participants_emailed',"All participants of #{@this_conference.title} have been emailed.", :vars => {:conference_title => @this_conference.title})
|
||||
- if @email_sent != :yes
|
||||
=paragraph(_'articles.conference_registration.paragraphs.Email_Participants','This page is used to contact all participants. Text can be entered as [Markdown](http://daringfireball.net/projects/markdown/basics). Pressing \'test\' will send the email only to you, make sure you do this and use caution in general before pressing \'send\'')
|
||||
- if @email_sent == :yes || @email_sent == :preview
|
||||
%h2=_'articles.conference_registration.headings.Preview'
|
||||
.email-preview
|
||||
%h3=@subject
|
||||
=paragraph @content
|
||||
- if @email_sent != :yes
|
||||
= form_tag broadcast_path(@this_conference.slug), class: 'composition' do
|
||||
- if @email_sent == :preview
|
||||
= hidden_field_tag :subject, @subject
|
||||
= hidden_field_tag :content, @content
|
||||
- else
|
||||
.text-field.input-field.big
|
||||
= label_tag :subject
|
||||
= text_field_tag :subject, @subject, :required => true
|
||||
.select-field.input-field
|
||||
= label_tag :content
|
||||
= text_area_tag :content, @content, :required => true
|
||||
.actions.right
|
||||
- if @email_sent == :test
|
||||
.note=_('articles.conference_registration.notes.Test_Email_Sent',"An email was sent to #{current_user.email}", vars: {:email_address => current_user.email})
|
||||
- if @email_sent == :preview # let the user send the
|
||||
= button_tag :edit, :value => :edit
|
||||
= button_tag :send, :value => :send
|
||||
- else
|
||||
= button_tag :preview, :value => :preview
|
||||
= button_tag :test, :value => :test
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
= render 'page_header', :page_key => 'Registration_Stats'
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Stats'
|
||||
%p=_'articles.conference_registration.paragraphs.Stats', :p
|
||||
= columns(medium: 6) do
|
||||
%ul.stats
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Total_Registrations'
|
||||
.stat.important=_!@total_registrations
|
||||
%li.money
|
||||
%h3=_'articles.conference_registration.terms.Total_Donations'
|
||||
.stat=money @total_donations
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Donation_Count'
|
||||
.stat
|
||||
= _!"#{@donation_count} / #{@total_registrations}"
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Housing'
|
||||
.breakdown
|
||||
- @housing.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.housing.#{h}"
|
||||
.stat=_!v
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Bikes'
|
||||
.breakdown
|
||||
.stat=_!"#{@bike_count} / #{@total_registrations}"
|
||||
- @bikes.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.bikes.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @bike_count)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Food'
|
||||
.breakdown
|
||||
- @food.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.food.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Languages'
|
||||
.breakdown
|
||||
- @languages.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"languages.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
= columns(medium: 6) do
|
||||
.allergies
|
||||
%h3=_'articles.conference_registration.headings.Allergies'
|
||||
%ul
|
||||
- @allergies.each do |a|
|
||||
%li
|
||||
%p=_!a
|
||||
.other
|
||||
%h3=_'articles.conference_registration.headings.other'
|
||||
%ul
|
||||
- @other.each do |o|
|
||||
%li
|
||||
%p=_!o
|
||||
@@ -0,0 +1 @@
|
||||
=paragraph @content
|
||||
@@ -0,0 +1 @@
|
||||
=@content
|
||||
@@ -1,4 +1,4 @@
|
||||
%p=_'email.confirmation.paragraph.please_confirm','Hello! To gain access to registration and other features of Bike!Bike!, please confirm your email address by clicking on following link:'
|
||||
- link = "#{@host}/confirm/#{@confirmation.token}"
|
||||
%p
|
||||
%a{href: link}=link
|
||||
%a{href: link}=_'email.confirmation.link.please_confirm'
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
=_'email.confirmation.paragraph.please_confirm','Hello! To gain access to registration and other features of Bike!Bike!, please confirm your email address by clicking on following link:'
|
||||
=''
|
||||
="#{@host}/confirm/#{@confirmation.token}"
|
||||
@@ -0,0 +1,10 @@
|
||||
= render 'conferences/page_header', :page_key => 'Delete_Workshop'
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.workshops.headings.Delete_Workshop',"Are you sure you want to delete the workshop: <em>#{@workshop.title}</em>?", :vars => {:title => "<em>#{@workshop.title}</em>".html_safe}
|
||||
= form_tag delete_workshop_path(@this_conference.slug, @workshop.id), class: 'composition' do
|
||||
.actions
|
||||
= button_tag :confirm, :value => :confirm, :class => :delete
|
||||
= button_tag :cancel, :value => :cancel
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Workshops'
|
||||
%h2=_'articles.workshops.headings.Workshops'
|
||||
= columns(medium: 6) do
|
||||
%p=_'articles.conference_registration.paragraphs.Workshops', :p
|
||||
%p=_'articles.workshops.paragraphs.Workshops', :p
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.conference_registration.headings.Your_Workshops'
|
||||
%h3=_'articles.workshops.headings.Your_Workshops'
|
||||
%ul.workshop-previews
|
||||
- @my_workshops.each do |w|
|
||||
- if w.title
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
|
||||
= (hidden_field_tag :workshop_id, @workshop.id) if @workshop
|
||||
= columns(medium: 12) do
|
||||
%p=(_'articles.workshops.paragraphs.info','Please accurately describe your workshop in detail. This will help hosts decide if they wish to add it to the schedule and when it should best be scheduled. Enter normal text but if you want to get fancy you can use <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">Markdown</a>.').html_safe
|
||||
=paragraph(_'articles.workshops.paragraphs.new_workshop','Please accurately describe your workshop in detail. This will help hosts decide if they wish to add it to the schedule and when it should best be scheduled. Enter normal text but if you want to get fancy you can use [Markdown](http://daringfireball.net/projects/markdown/basics).').html_safe
|
||||
.text-field.input-field.big
|
||||
= label_tag :title
|
||||
= text_field_tag :title, @title, :required => true
|
||||
@@ -13,32 +13,47 @@
|
||||
= text_area_tag :info, @info, :required => true
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.languages','Workshop Language'
|
||||
.check-box-field.input-field
|
||||
- [:en, :es, :fr].each do |language|
|
||||
= check_box_tag "languages[#{language}]", 1, @languages.include?(language)
|
||||
- [:en, :es, :fr].each do |language|
|
||||
.single-check-box-field.input-field
|
||||
= label_tag "languages_#{language}" do
|
||||
= check_box_tag "languages[#{language}]", 1, @languages && @languages.include?(language)
|
||||
= _"languages.#{language}"
|
||||
%h3=_'articles.workshops.headings.theme','Theme'
|
||||
%p=_'articles.workshops.paragraphs.theme', :p
|
||||
.check-box-field.input-field
|
||||
- [:race_gender, :mechanics, :funding, :organization, :community, :other].each do |theme|
|
||||
= radio_button_tag :theme, theme, @theme == theme
|
||||
.input-field-help=_'articles.workshops.paragraphs.theme', :p
|
||||
- theme_found = false
|
||||
- [:race_gender, :mechanics, :funding, :organization, :community].each do |theme|
|
||||
.single-radio-button-field.input-field
|
||||
= label_tag "theme_#{theme}" do
|
||||
- is_selected = (@theme == theme)
|
||||
- theme_found ||= is_selected
|
||||
= radio_button_tag :theme, theme, is_selected
|
||||
= _"workshop.options.theme.#{theme}"
|
||||
.single-radio-button-field.other-field.input-field
|
||||
= label_tag "theme_other" do
|
||||
= radio_button_tag :theme, :other, (@theme && !theme_found)
|
||||
%div
|
||||
= _"workshop.options.theme.other"
|
||||
= text_field_tag :other_theme, (@theme && !theme_found ? @theme : nil)
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.needs','What do you need?'
|
||||
.check-box-field.input-field
|
||||
- [:sound, :projector, :tools].each do |need|
|
||||
= check_box_tag "needs[#{need}]", 1, @needs.include?(need)
|
||||
- [:sound, :projector, :tools].each do |need|
|
||||
.single-check-box-field.input-field
|
||||
= label_tag "needs_#{need}" do
|
||||
= check_box_tag "needs[#{need}]", 1, @needs.include?(need)
|
||||
= _"workshop.options.needs.#{need}"
|
||||
%h3=_'articles.workshops.headings.space','Type of space'
|
||||
%p=_'articles.workshops.paragraphs.space', :p
|
||||
.check-box-field.input-field
|
||||
- [:workshop, :meeting_room, :outdoor_meeting].each do |space|
|
||||
= radio_button_tag :space, space, @space == space
|
||||
.input-field-help=_'articles.workshops.paragraphs.space', :p
|
||||
- [:meeting_room, :workshop, :outdoor_meeting].each do |space|
|
||||
.single-radio-button-field.input-field
|
||||
= label_tag "space_#{space}" do
|
||||
= radio_button_tag :space, space, @space == space
|
||||
= _"workshop.options.space.#{space}"
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.notes','Notes for Conference Organizers and Workshop Facilitators'
|
||||
%p=_'articles.workshops.paragraphs.notes','Notes are only viewable by conference hosts and workshop facilitators'
|
||||
.text-area-field.input-field
|
||||
= label_tag :notes
|
||||
= text_area_tag :notes, @notes
|
||||
= columns(medium: 12) do
|
||||
.actions.right
|
||||
= button_tag :save, :value => :save
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_!@workshop.title
|
||||
=paragraph _!(@workshop.info) || ''
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.facilitators'
|
||||
.facilitators
|
||||
- @workshop.workshop_facilitators.each do |f|
|
||||
@@ -11,6 +12,24 @@
|
||||
- u = User.find(f.user_id)
|
||||
.name=_!(u.firstname || u.username || u.email)
|
||||
.role=_"roles.workshops.facilitator.#{f.role}"
|
||||
- if @workshop.languages
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.languages','Workshop Language'
|
||||
%p= _!((JSON.parse(@workshop.languages || '[]').map { |x| _"languages.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if @workshop.theme
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.theme','Theme'
|
||||
%p= [:race_gender, :mechanics, :funding, :organization, :community].include?((@workshop.theme || '').to_sym) ? (_"workshop.options.theme.#{@workshop.theme}") : @workshop.theme
|
||||
- if @workshop.can_edit?(current_user) || @this_conference.host?(current_user)
|
||||
- if @workshop.needs
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.needs','What do you need?'
|
||||
%p= _!((JSON.parse(@workshop.needs || '[]').map { |x| _"workshop.options.needs.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if @workshop.notes
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.notes','Notes'
|
||||
=paragraph _!(@workshop.notes)
|
||||
= columns(medium: 12) do
|
||||
.actions
|
||||
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => 'button modify') if @workshop.can_edit?(current_user)
|
||||
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)
|
||||
Reference in New Issue
Block a user