From 75cf1123cfcf572e2c4e108d3ad828fca4090e6e Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Mon, 7 Jul 2014 17:55:34 +0530 Subject: [PATCH] Adds email template and settings for conference dates updates --- app/models/email_settings.rb | 4 +++- app/views/admin/emails/index.html.haml | 3 +++ ...20158_add_conference_dates_updates_to_email_settings.rb | 7 +++++++ db/schema.rb | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20140707120158_add_conference_dates_updates_to_email_settings.rb diff --git a/app/models/email_settings.rb b/app/models/email_settings.rb index 532869cc..876a1c1a 100644 --- a/app/models/email_settings.rb +++ b/app/models/email_settings.rb @@ -3,7 +3,9 @@ class EmailSettings < ActiveRecord::Base :send_on_confirmed_without_registration, :registration_email_template, :accepted_email_template, :rejected_email_template, :confirmed_email_template, :registration_subject, :accepted_subject, :rejected_subject, - :confirmed_without_registration_subject + :confirmed_without_registration_subject, + :send_on_updated_conferences_dates, :updated_conference_dates_subject + :updated_conference_dates_template def get_values(conference, user, event = nil) h = { diff --git a/app/views/admin/emails/index.html.haml b/app/views/admin/emails/index.html.haml index c33b0596..43474048 100644 --- a/app/views/admin/emails/index.html.haml +++ b/app/views/admin/emails/index.html.haml @@ -35,6 +35,9 @@ = f.input :send_on_confirmed_without_registration, :label => false, :hint => "Send an email when a user has a confirmed proposal, but isn't yet registered?" = f.input :confirmed_without_registration_subject = f.input :confirmed_email_template, :input_html => { :rows => 10, :cols => 20 } + = f.input :send_on_updated_conference_dates, hint: "This is to notify all participants that the conference dates has been changed." + = f.input :updated_conference_dates_subject + = f.input :updated_conference_dates_template, :input_html => { :rows => 10, :cols => 20 } = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} :javascript diff --git a/db/migrate/20140707120158_add_conference_dates_updates_to_email_settings.rb b/db/migrate/20140707120158_add_conference_dates_updates_to_email_settings.rb new file mode 100644 index 00000000..24889597 --- /dev/null +++ b/db/migrate/20140707120158_add_conference_dates_updates_to_email_settings.rb @@ -0,0 +1,7 @@ +class AddConferenceDatesUpdatesToEmailSettings < ActiveRecord::Migration + def change + add_column :email_settings, :send_on_updated_conference_dates, :boolean, default: true + add_column :email_settings, :updated_conference_dates_subject, :string + add_column :email_settings, :updated_conference_dates_template, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index ad4bad11..f2d0733a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -164,6 +164,9 @@ ActiveRecord::Schema.define(version: 20140714141156) do t.string "accepted_subject" t.string "rejected_subject" t.string "confirmed_without_registration_subject" + t.boolean "send_on_updated_conference_dates", default: true + t.string "updated_conference_dates_subject" + t.text "updated_conference_dates_template" end create_table "event_attachments", force: true do |t|