diff --git a/app/controllers/admin/system_emails_controller.rb b/app/controllers/admin/system_emails_controller.rb index de09c7c1f..da86b1e9a 100644 --- a/app/controllers/admin/system_emails_controller.rb +++ b/app/controllers/admin/system_emails_controller.rb @@ -1,7 +1,22 @@ class Admin::SystemEmailsController < Admin::BaseController + before_action :load_system_email, only: [:view] + def index @system_emails = %w(proposal_notification_digest) end + def view + case @system_email + when "proposal_notification_digest" + @notifications = Notification.where(notifiable_type: "ProposalNotification").limit(2) + @subject = t('mailers.proposal_notification_digest.title', org_name: Setting['org_name']) + end + end + + private + + def load_system_email + @system_email = params[:system_email_id] + end end diff --git a/app/views/admin/system_emails/index.html.erb b/app/views/admin/system_emails/index.html.erb index d2962fba2..6e294d4e5 100644 --- a/app/views/admin/system_emails/index.html.erb +++ b/app/views/admin/system_emails/index.html.erb @@ -20,8 +20,6 @@
+ <%= t("admin.newsletters.show.body_help_text") %> +
+ +