Fix email variables (close #569)
This commit is contained in:
parent
87b1aba1e9
commit
a629852f91
1 changed files with 18 additions and 5 deletions
|
|
@ -19,18 +19,31 @@ class EmailSettings < ActiveRecord::Base
|
||||||
'conference' => conference.title,
|
'conference' => conference.title,
|
||||||
'conference_start_date' => conference.start_date,
|
'conference_start_date' => conference.start_date,
|
||||||
'conference_end_date' => conference.end_date,
|
'conference_end_date' => conference.end_date,
|
||||||
'venue' => conference.venue.name,
|
'registrationlink' => Rails.application.routes.url_helpers.conference_conference_registrations_path(
|
||||||
'venue_address' => conference.venue.address,
|
|
||||||
'registrationlink' => Rails.application.routes.url_helpers.new_conference_conference_registrations_url(
|
|
||||||
conference.short_title, host: CONFIG['url_for_emails']),
|
conference.short_title, host: CONFIG['url_for_emails']),
|
||||||
'conference_splash_link' => Rails.application.routes.url_helpers.conference_url(
|
'conference_splash_link' => Rails.application.routes.url_helpers.conference_url(
|
||||||
conference.short_title, host: CONFIG['url_for_emails']),
|
conference.short_title, host: CONFIG['url_for_emails']),
|
||||||
'cfp_start_date' => conference.call_for_paper.start_date,
|
|
||||||
'cfp_end_date' => conference.call_for_paper.end_date,
|
|
||||||
'schedule_link' => Rails.application.routes.url_helpers.schedule_conference_url(
|
'schedule_link' => Rails.application.routes.url_helpers.schedule_conference_url(
|
||||||
conference.short_title, host: CONFIG['url_for_emails'])
|
conference.short_title, host: CONFIG['url_for_emails'])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if conference.call_for_paper
|
||||||
|
h['cfp_start_date'] = conference.call_for_paper.start_date
|
||||||
|
h['cfp_end_date'] = conference.call_for_paper.end_date
|
||||||
|
else
|
||||||
|
h['cfp_start_date'] = 'Unknown'
|
||||||
|
h['cfp_end_date'] = 'Unknown'
|
||||||
|
end
|
||||||
|
|
||||||
|
if conference.venue
|
||||||
|
h['venue'] = conference.venue.name
|
||||||
|
h['venue_address'] = conference.venue.address
|
||||||
|
else
|
||||||
|
h['venue'] = 'Unknown'
|
||||||
|
h['venue_address'] = 'Unknown'
|
||||||
|
end
|
||||||
|
|
||||||
if conference.registration_period
|
if conference.registration_period
|
||||||
h['registration_start_date'] = conference.registration_period.start_date
|
h['registration_start_date'] = conference.registration_period.start_date
|
||||||
h['registration_end_date'] = conference.registration_period.end_date
|
h['registration_end_date'] = conference.registration_period.end_date
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue