2020-05-13 23:07:52 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Emails
|
|
|
|
module Groups
|
|
|
|
def group_was_exported_email(current_user, group)
|
|
|
|
group_email(current_user, group, _('Group was exported'))
|
|
|
|
end
|
|
|
|
|
|
|
|
def group_was_not_exported_email(current_user, group, errors)
|
|
|
|
group_email(current_user, group, _('Group export error'), errors: errors)
|
|
|
|
end
|
|
|
|
|
|
|
|
def group_email(current_user, group, subj, errors: nil)
|
|
|
|
@group = group
|
|
|
|
@errors = errors
|
2022-09-08 14:10:47 -04:00
|
|
|
mail_with_locale(to: current_user.notification_email_for(@group), subject: subject(subj))
|
2020-05-13 23:07:52 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|