Almost ready to merge
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
-#- small_banner = (params['controller'] == 'conferences' && params['action'] != 'show')
|
||||
-#- if small_banner
|
||||
-# - body_class('small-banner')
|
||||
-#- page_style (params['controller'] == 'conferences' ? 'article' : 'emphasize-banner')
|
||||
|
||||
- content_for :banner do
|
||||
#header-title{style: capable_of(:svg) ? nil : "background-image: url(#{@conference.cover_url})"}
|
||||
- if capable_of(:svg)
|
||||
= render 'conferences/banner_image.svg'
|
||||
- style = nil
|
||||
- cover = nil
|
||||
- figure = nil
|
||||
- if capable_of(:css_mixblendmode) || ENV['RAILS_ENV'] == 'test'
|
||||
- cover = "<div class=\"cover\" style=\"background-image: url(#{@conference.cover_url})\"></div>"
|
||||
- elsif capable_of(:svg)
|
||||
- banner_image = 'conferences/banner_image.svg'
|
||||
- else
|
||||
- style = "background-image: url(#{@conference.cover_url})"
|
||||
#header-title{style: style}
|
||||
= render banner_image if banner_image
|
||||
= cover.html_safe if cover
|
||||
.title
|
||||
%h2.background=_!"#{@conference.start_date.year.to_s}!"
|
||||
.details
|
||||
@@ -15,54 +19,3 @@
|
||||
= date_span(@conference.start_date.to_date, @conference.end_date.to_date)
|
||||
%figure
|
||||
%img{src: @conference.poster.full.url}
|
||||
-# =columns({medium: 7}) do
|
||||
-# - title = @conference.conference_type.slug == 'bikebike' ? 'Bike!Bike! '+@conference.start_date.year.to_s : @conference.title
|
||||
-# %div
|
||||
-# %h1
|
||||
-# - if params['controller'] == 'conferences' && params['action'] == 'show'
|
||||
-# = title
|
||||
-# - else
|
||||
-# %a{href: @conference.url}=title
|
||||
-# %em
|
||||
-# - if params['controller'] != 'conferences'
|
||||
-# - info = nil
|
||||
-# - if @conference.registration_open
|
||||
-# - if @conference.registration_info
|
||||
-# - info = @conference.registration_info
|
||||
-# - elsif @conference.end_date < Time.now
|
||||
-# - if @conference.preregistration_info
|
||||
-# - info = @conference.postregistration_info
|
||||
-# - elsif @conference.preregistration_info
|
||||
-# - info = @conference.preregistration_info
|
||||
-# - if info
|
||||
-# = info.html_safe
|
||||
-# - else
|
||||
-# %p= ActionView::Base.full_sanitizer.sanitize(@conference.info).gsub(/^(.{300,350}\.)(.*)$/m, '\1...')
|
||||
=#columns({medium: 5}) do
|
||||
-# %div
|
||||
-# - if params['controller'] != 'conferences'
|
||||
-# %a.button.more{href: @conference.url}
|
||||
-# =_'conference.More_Info'
|
||||
-# - if @conference.registration_open && !small_banner
|
||||
-# %a.button#register-now.register-now{href: @conference.url(:register)}
|
||||
-# =_'conference.Register_Now'
|
||||
-# #register-dlg
|
||||
-# = form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :method => :post do
|
||||
-# = hidden_field_tag :step, 'register'
|
||||
-# = email_field_tag :email
|
||||
-# = form_actions :register
|
||||
-# - if !small_banner && @conference.registration_open
|
||||
-# - content_for :dom_ready do
|
||||
-# :plain
|
||||
-# $('a.register-now').click(function(e) {
|
||||
-# e.preventDefault();
|
||||
-# if ($('#register-dlg').hasClass('open')) {
|
||||
-# $('#register-dlg form').submit();
|
||||
-# }
|
||||
-# $('#register-dlg').toggleClass('open');
|
||||
-# });
|
||||
-# $('#register-dlg').click(function(e) {
|
||||
-# if ($(e.target).attr('id') == 'register-dlg') {
|
||||
-# $('#register-dlg').toggleClass('open');
|
||||
-# }
|
||||
-# });
|
||||
@@ -1,2 +1,11 @@
|
||||
= email_field_tag :email, session[:registration][:email]
|
||||
|
||||
%article
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Enter_Your_Email','Enter your email address'
|
||||
= columns(medium: 6, large: 7) do
|
||||
%p=_'articles.conference_registration.paragraphs.confirm_email_address', :p
|
||||
= columns(medium: 6, large: 5) do
|
||||
= form_tag :do_confirm, :method => :post do
|
||||
.email-field.input-field
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= button_tag :register, :value => :register
|
||||
|
||||
@@ -1,155 +1,4 @@
|
||||
- title (_'conferences.register.page_title.Conference_Registration')
|
||||
- content_for :banner do
|
||||
- image = image_url(@conference.cover_url || 'empty-racks.jpg')
|
||||
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"}
|
||||
- if capable_of(:svg)
|
||||
= render 'application/banner_image.svg', {:image => image}
|
||||
%h1=_(@page_title || 'page_titles.conferences.Conference_Registration')
|
||||
= render :partial => 'page_header', :locals => {:page_key => 'Conference_Registration'}
|
||||
%article
|
||||
= row do
|
||||
- case @register_template
|
||||
- when :confirm_email
|
||||
= 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
|
||||
- when :payment
|
||||
= 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 nil, :name => :amount, :value => '25.0' do
|
||||
= number_to_currency(25, :unit => '$')
|
||||
= button_tag nil, :name => :amount, :value => '50.0' do
|
||||
= number_to_currency(50, :unit => '$')
|
||||
= button_tag nil, :name => :amount, :value => '100.0' do
|
||||
= number_to_currency(100, :unit => '$')
|
||||
= 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)
|
||||
- when :policy
|
||||
= 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
|
||||
%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
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.conference_registration.paragraphs.Confirm_Agreement', :p
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.checkbox-field.input-field
|
||||
= label_tag :policy_confirm
|
||||
= check_box_tag :policy_confirm, "1", false, required: true
|
||||
= button_tag :agree, :value => :policy
|
||||
- when :questions
|
||||
= 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
|
||||
= date_field_tag :arrival, @registration.arrival.strftime("%Y-%m-%d")
|
||||
= date_field_tag :departure, @registration.departure.strftime("%Y-%m-%d")
|
||||
%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.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
|
||||
- when :workshops
|
||||
= 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();
|
||||
- else
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Enter_Your_Email','Enter your email address'
|
||||
= columns(medium: 6, large: 7) do
|
||||
%p=_'articles.conference_registration.paragraphs.confirm_email_address', :p
|
||||
= columns(medium: 6, large: 5) do
|
||||
= form_tag :do_confirm do
|
||||
.email-field.input-field
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= button_tag :register, :value => :register
|
||||
= render (@register_template || :register).to_s
|
||||
|
||||
Reference in New Issue
Block a user