Commit 2d3b1af4 authored by Jiri Strojil's avatar Jiri Strojil
Browse files

Made some variables working

parent 2a7a5fba
...@@ -34,8 +34,8 @@ class EmailTemplate < ApplicationRecord ...@@ -34,8 +34,8 @@ class EmailTemplate < ApplicationRecord
trial: ReminderMailing::TEMPLATE_VARNAMES, trial: ReminderMailing::TEMPLATE_VARNAMES,
half_year: ReminderMailing::TEMPLATE_VARNAMES, half_year: ReminderMailing::TEMPLATE_VARNAMES,
termination: ReminderMailing::TEMPLATE_VARNAMES, termination: ReminderMailing::TEMPLATE_VARNAMES,
half_year_process_email: ReminderMailing::TEMPLATE_VARNAMES + [:Semester], half_year_process_email: SemesterProcessMail.template_varnames[:mail],
half_year_process_overdue: ReminderMailing::TEMPLATE_VARNAMES + [:Semester] half_year_process_overdue: SemesterProcessMail.template_varnames[:reminder]
} }
end end
......
...@@ -12,10 +12,20 @@ class SemesterProcessMail < ApplicationRecord ...@@ -12,10 +12,20 @@ class SemesterProcessMail < ApplicationRecord
delegate :volunteer, to: :semester_process_volunteer delegate :volunteer, to: :semester_process_volunteer
delegate :semester_process, to: :semester_process_volunteer delegate :semester_process, to: :semester_process_volunteer
TEMPLATE_VARNAMES = [
:Anrede,
:Name,
:Einsatz,
:FeedbackLink,
:EmailAbsender,
:Semester
].freeze
def self.template_varnames def self.template_varnames
{ {
mail: EmailTemplate::template_varnames[:half_year_process_email], mail: TEMPLATE_VARNAMES,
reminder: EmailTemplate::template_varnames[:half_year_process_overdue] reminder: TEMPLATE_VARNAMES
} }
end end
...@@ -50,11 +60,6 @@ class SemesterProcessMail < ApplicationRecord ...@@ -50,11 +60,6 @@ class SemesterProcessMail < ApplicationRecord
"#{ I18n.l(semester_process.semester.begin)} - #{I18n.l(semester_process.semester.end)}" "#{ I18n.l(semester_process.semester.begin)} - #{I18n.l(semester_process.semester.end)}"
end end
def einsatz_start
#I18n.l(reminder_mailable.period_start) if reminder_mailable.period_start
''
end
def einsatz def einsatz
'' ''
end end
...@@ -74,7 +79,7 @@ class SemesterProcessMail < ApplicationRecord ...@@ -74,7 +79,7 @@ class SemesterProcessMail < ApplicationRecord
end end
def feedback_url(options = {}) def feedback_url(options = {})
'' review_semester_semester_process_volunteer_path(semester_process_volunteer)
end end
private private
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment