Registration thank you email and proposed workshops on front page

This commit is contained in:
Godwin
2015-09-11 17:31:14 -07:00
parent 326138a2fe
commit a0e8563d9d
25 changed files with 270 additions and 59 deletions
+16
View File
@@ -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;
}
}
}
+7 -1
View File
@@ -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
+11 -1
View File
@@ -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
+3
View File
@@ -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
+7 -4
View File
@@ -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
@@ -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}
@@ -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}