diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index 521dc96..6841219 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -1841,3 +1841,19 @@ html[data-lingua-franca-example="html"] { @include translation-pointer; } + +.workshop-list { + list-style: none; + + .workshop-description { + font-size: 0.75em; + } + + li { + border-bottom: 1px dashed #CCC; + + &:last-child { + border-bottom: 0; + } + } +} \ No newline at end of file diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index 73aabc6..bf84a25 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -487,7 +487,9 @@ class ConferencesController < ApplicationController @register_template = :questions if is_post when :save if is_post - @registration ||= ConferenceRegistration.new + if (new_registration = (!@registration)) + @registration = ConferenceRegistration.new + end @registration.conference_id = @this_conference.id @registration.user_id = current_user.id @@ -508,6 +510,10 @@ class ConferencesController < ApplicationController current_user.lastname = nil current_user.save + if new_registration + UserMailer.registration_confirmation(@registration).deliver_now + end + @register_template = @registration.registration_fees_paid ? :done : :payment end when :payment diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index c028d11..bc9cd2c 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -64,13 +64,23 @@ class UserMailer < ActionMailer::Base end def email_confirmation(confirmation) - #puts " == #{instance_methods.to_json.to_s} == " @confirmation = confirmation @host = UserMailer.default_url_options[:host] mail to: confirmation.user.email, subject: (_'email.subject.confirm_email','Please confirm your email address') end + def registration_confirmation(registration) + @host = UserMailer.default_url_options[:host] + @registration = registration + @conference = Conference.find(@registration.conference_id) + @user = User.find(@registration.user_id) + mail to: @user.email, + subject: _('email.subject.registration_confirmed', + "Thank you for registering for #{@conference.title}", + :vars => {:conference_title => @conference.title}) + end + def broadcast(host, subject, content, user, conference) #puts " == #{instance_methods.to_json.to_s} == " @host = host diff --git a/app/models/conference.rb b/app/models/conference.rb index 363c162..4630208 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -35,5 +35,8 @@ class Conference < ActiveRecord::Base action = action.to_sym '/conferences/' + conference_type.slug + '/' + slug + (action == :show ? '' : '/' + action.to_s) end + def location + organizations.first.location + end end diff --git a/app/views/application/home.html.haml b/app/views/application/home.html.haml index af6b8ed..f03c76e 100644 --- a/app/views/application/home.html.haml +++ b/app/views/application/home.html.haml @@ -4,7 +4,10 @@ %article %h2=_!@conference.title =@conference.info.html_safe - -- # %article.supplementary -- # %h2=_'section_titles.bikebike.About_BikeBike' -- # %p=_'section_content.bikebike.about_bikebike', :p + %h3=_'acticles.conferences.headings.Proposed_Workshops' + %p=_'acticles.conferences.paragraphs.Proposed_Workshops', "Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process." + %ul.workshop-list + - @conference.workshops.each do |w| + %li + %h4=w.title + .workshop-description=markdown w.info diff --git a/app/views/user_mailer/registration_confirmation.html.haml b/app/views/user_mailer/registration_confirmation.html.haml new file mode 100644 index 0000000..0172be4 --- /dev/null +++ b/app/views/user_mailer/registration_confirmation.html.haml @@ -0,0 +1,4 @@ +%p=_'email.general.paragraph.thank_you', "Thank you #{@user.firstname},", :vars => {:name => @user.firstname} +%p=_'email.registration.paragraph.confirmed', "You have successfully registered for #{@conference.title}. You can modify your registration details, pay, or add workshops at any time by restarting the registration process. If you have yet to pay or add your workshops and plan to do so, we ask that you take care of it as soon as possible to help us prepare in advance of your arrival.", :vars => {:conference_title => @conference.title} + +%p=_'email.general.paragraph.see_you', "See you in #{@conference.location.city}!", :vars => {:conference_location => @conference.location.city} \ No newline at end of file diff --git a/app/views/user_mailer/registration_confirmation.text.haml b/app/views/user_mailer/registration_confirmation.text.haml new file mode 100644 index 0000000..e5dd795 --- /dev/null +++ b/app/views/user_mailer/registration_confirmation.text.haml @@ -0,0 +1,5 @@ +=_'email.general.paragraph.thank_you', "Thank you #{@user.firstname},", :vars => {:name => @user.firstname} + +=_'email.registration.paragraph.confirmed', "You have successfully registered for #{@conference.title}. You can modify your registration details, pay, or add workshops at any time by restarting the registration process. If you have yet to pay or add your workshops and plan to do so, we ask that you take care of it as soon as possible to help us prepare in advance of your arrival.", :vars => {:conference_title => @conference.title} + +=_'email.general.paragraph.see_you', "See you in #{@conference.location.city}!", :vars => {:conference_location => @conference.location.city} \ No newline at end of file diff --git a/config/locales/data/html_records/Broadcast-message---1.html b/config/locales/data/html_records/Broadcast-message---1.html index ff1f60d..bb8edac 100644 --- a/config/locales/data/html_records/Broadcast-message---1.html +++ b/config/locales/data/html_records/Broadcast-message---1.html @@ -46,7 +46,7 @@

San Marcos, Texas

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -60,6 +60,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/Broadcast-message--.html b/config/locales/data/html_records/Broadcast-message--.html index ff1f60d..bb8edac 100644 --- a/config/locales/data/html_records/Broadcast-message--.html +++ b/config/locales/data/html_records/Broadcast-message--.html @@ -46,7 +46,7 @@

San Marcos, Texas

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -60,6 +60,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html b/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html index a051c28..f4ec143 100644 --- a/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html +++ b/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html @@ -38,6 +38,22 @@ cursor: default; } } + h3 b { + padding: 10px 20px; + line-height: 50px; + } + h3 b a { + color: #FFF !important; + background-color: #02CA9E; + text-decoration: none !important; + border-radius: 4px; + padding: 10px 15px; + margin-left: 20px; + border-bottom: 3px solid #00AF88; + } + h3 b a:hover { + background-color: #00AF88; + } @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { a[href^="tel"], a[href^="sms"] { text-decoration: none; @@ -61,7 +77,7 @@ @@ -77,7 +93,7 @@ diff --git a/config/locales/data/html_records/Create-workshop---1.html b/config/locales/data/html_records/Create-workshop---1.html index ff1f60d..bb8edac 100644 --- a/config/locales/data/html_records/Create-workshop---1.html +++ b/config/locales/data/html_records/Create-workshop---1.html @@ -46,7 +46,7 @@

San Marcos, Texas

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -60,6 +60,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/Create-workshop--.html b/config/locales/data/html_records/Create-workshop--.html index 234a0c2..bb8edac 100644 --- a/config/locales/data/html_records/Create-workshop--.html +++ b/config/locales/data/html_records/Create-workshop--.html @@ -13,59 +13,57 @@ - +
-
-

Please confirm your email address

-
- - - - +
+
+
+ +
-
+ +
+
+

My Bike!Bike!

+Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
    +
@@ -94,7 +92,7 @@ EN
@@ -64,6 +64,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/See-a-register-link---1.html b/config/locales/data/html_records/See-a-register-link---1.html index a349942..8072a7e 100644 --- a/config/locales/data/html_records/See-a-register-link---1.html +++ b/config/locales/data/html_records/See-a-register-link---1.html @@ -41,7 +41,7 @@

Sackville, New Brunswick

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -55,6 +55,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/See-a-register-link--.html b/config/locales/data/html_records/See-a-register-link--.html index 7a767ab..774ad71 100644 --- a/config/locales/data/html_records/See-a-register-link--.html +++ b/config/locales/data/html_records/See-a-register-link--.html @@ -50,7 +50,7 @@

Halifax, Nova Scotia

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -64,6 +64,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/Start-registration-from-landing-page---1.html b/config/locales/data/html_records/Start-registration-from-landing-page---1.html index 0ee104a..22993a1 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page---1.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page---1.html @@ -41,7 +41,7 @@

Halifax, Nova Scotia

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -55,6 +55,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--.html b/config/locales/data/html_records/Start-registration-from-landing-page--.html index a349942..8072a7e 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--.html @@ -41,7 +41,7 @@

Sackville, New Brunswick

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -55,6 +55,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html b/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html index db8695e..2a82964 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html @@ -38,6 +38,22 @@ cursor: default; } } + h3 b { + padding: 10px 20px; + line-height: 50px; + } + h3 b a { + color: #FFF !important; + background-color: #02CA9E; + text-decoration: none !important; + border-radius: 4px; + padding: 10px 15px; + margin-left: 20px; + border-bottom: 3px solid #00AF88; + } + h3 b a:hover { + background-color: #00AF88; + } @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { a[href^="tel"], a[href^="sms"] { text-decoration: none; @@ -62,7 +78,11 @@ @@ -74,7 +94,7 @@ diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html b/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html index feb246e..496af18 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html @@ -67,8 +67,8 @@
- - + +

Which languages do you speak?

diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-4.html b/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-4.html index 1934881..116a77a 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-4.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-4.html @@ -68,7 +68,7 @@ diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-5.html b/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-5.html index 1934881..116a77a 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-5.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--conferences.MyBikeBike.register-5.html @@ -68,7 +68,7 @@ diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html b/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html index db8695e..2a82964 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html @@ -38,6 +38,22 @@ cursor: default; } } + h3 b { + padding: 10px 20px; + line-height: 50px; + } + h3 b a { + color: #FFF !important; + background-color: #02CA9E; + text-decoration: none !important; + border-radius: 4px; + padding: 10px 15px; + margin-left: 20px; + border-bottom: 3px solid #00AF88; + } + h3 b a:hover { + background-color: #00AF88; + } @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { a[href^="tel"], a[href^="sms"] { text-decoration: none; @@ -62,7 +78,11 @@ @@ -74,7 +94,7 @@ diff --git a/config/locales/data/html_records/View-stats---1.html b/config/locales/data/html_records/View-stats---1.html index 5edbb8a..94bad7b 100644 --- a/config/locales/data/html_records/View-stats---1.html +++ b/config/locales/data/html_records/View-stats---1.html @@ -46,7 +46,7 @@

Anchorage, Alaska

-August 10 – 14, 2015 +August 12 – 16, 2015
@@ -60,6 +60,10 @@ August 10 – 14, 2015

My Bike!Bike!

Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. +

Proposed Workshops

+

Would you like to facilitate your own workshop? Simply register and visit the workshops page. If you have already registered you can access the page by restarting the registration process.

+
diff --git a/config/locales/data/translation-info.yml b/config/locales/data/translation-info.yml index ca87afa..c86da3c 100644 --- a/config/locales/data/translation-info.yml +++ b/config/locales/data/translation-info.yml @@ -77,6 +77,41 @@ date.date_span: - Create-workshop---1 - Broadcast-message-- - Broadcast-message---1 +acticles.conferences.headings.Proposed_Workshops: + pages: + - "/" + examples: + - See-a-more-info-link-- + - See-a-more-info-link---1 + - See-a-register-link-- + - See-a-register-link---1 + - Start-registration-from-landing-page-- + - Start-registration-from-landing-page---1 + - View-stats-- + - View-stats---1 + - Create-workshop-- + - Create-workshop---1 + - Broadcast-message-- + - Broadcast-message---1 +acticles.conferences.paragraphs.Proposed_Workshops: + pages: + - "/" + context: Would you like to facilitate your own workshop? Simply register and visit + the workshops page. If you have already registered you can access the page by + restarting the registration process. + examples: + - See-a-more-info-link-- + - See-a-more-info-link---1 + - See-a-register-link-- + - See-a-register-link---1 + - Start-registration-from-landing-page-- + - Start-registration-from-landing-page---1 + - View-stats-- + - View-stats---1 + - Create-workshop-- + - Create-workshop---1 + - Broadcast-message-- + - Broadcast-message---1 page_descriptions.home: pages: - "/" @@ -1152,6 +1187,45 @@ forms.labels.generic.other: - "/conferences/:slug/register" examples: - Start-registration-from-landing-page--conferences.MyBikeBike.register-3 +email.subject.registration_confirmed: + pages: + - "/conferences/:slug/register" + context: Thank you for registering for My Bike!Bike! + vars: + - :conference_title + examples: + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 +email.general.paragraph.thank_you: + pages: + - "/conferences/:slug/register" + context: Thank you John Doe, + vars: + - :name + examples: + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 +email.registration.paragraph.confirmed: + pages: + - "/conferences/:slug/register" + context: You have successfully registered for My Bike!Bike!. You can modify your + registration details, pay, or add workshops at any time by restarting the registration + process. If you have yet to pay or add your workshops and plan to do so, we ask + that you take care of it as soon as possible to help us prepare in advance of + your arrival. + vars: + - :conference_title + examples: + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 +email.general.paragraph.see_you: + pages: + - "/conferences/:slug/register" + context: See you in Halifax! + vars: + - :conference_location + examples: + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 + - Start-registration-from-landing-page--conferences.MyBikeBike.register-4 articles.conference_registration.headings.Payment: pages: - "/conferences/:slug/register"
- +
-© Bike!Bike! 2015 +© Bike!Bike! 2015

Hello! To gain access to registration and other features of Bike!Bike!, please confirm your email address.

-Confirm now +

+ +Confirm now + +

-© Bike!Bike! 2015 +© Bike!Bike! 2015

Hello! To gain access to registration and other features of Bike!Bike!, please confirm your email address.

-Confirm now +

+ +Confirm now + +

-© Bike!Bike! 2015 +© Bike!Bike! 2015