email template modified

This commit is contained in:
Harry Bomrah 2016-08-02 18:41:29 +08:00
parent 5e762fa542
commit 239eca2f0d
3 changed files with 18 additions and 10 deletions

View File

@ -125,7 +125,7 @@ module Admin::AnnouncementsHelper
email = user.member_profile.email
if !email.nil? && email != ""
url = "http://#{request.host_with_port}/admin/announcements/#{announcement.id}/edit"
datatosend = "<h3>Hello #{user.name}</h3>,<p>#{current_user.name} #{t("announcement.rejected_annoucement")} : #{announcement.rejection_reason} <a href='#{url}'> #{t("announcement.click_here_to_see")}</a></p>"
datatosend = "<h3>Hello #{user.name},</h3><p>#{current_user.name} #{t("announcement.rejected_annoucement")} : #{announcement.rejection_reason} <a href='#{url}'> #{t("announcement.click_here_to_see")}</a></p>"
mail = Email.new(:mail_to => email, :mail_subject => "Announcement rejected公告未通過 : #{announcement.title}.", :template => "email/announcement_email.html.erb", :template_data => {"html" => datatosend})
mail.deliver rescue nil
end
@ -155,11 +155,11 @@ module Admin::AnnouncementsHelper
case type
when "approval"
datatosend = "<h3>Hello #{name}</h3>,<p>#{current_user.name} #{t("announcement.submitted_new_announcement")} <a href='#{url}'> #{t("announcement.click_here_to_see")}</a></p>"
datatosend = "<h3>#{t("announcement.approval_mail_hi", :name => name)},</h3><p>#{t("announcement.submitted_new_announcement", :poster => current_user.name)}<br /><br />#{t("announcement.approval_announcement_title")} : #{announcement.title} <br /> #{t("announcement.click_here_to_see")} : <a href='#{url}'> #{url} </a></p>"
when "reapproval"
datatosend = "<h3>Hello #{name}</h3>,<p>#{current_user.name} #{t("announcement.updated_annoucement")} <a href='#{url}'> #{t("announcement.click_here_to_see")}</a></p>"
datatosend = "<h3>#{t("announcement.approval_mail_hi", :name => name)},</h3><p>#{t("announcement.updated_annoucement", :poster => current_user.name)}<br /><br />#{t("announcement.approval_announcement_title")} : #{announcement.title} <br /> #{t("announcement.click_here_to_see")} : <a href='#{url}'> #{url} </a></p>"
end
email = Email.new(:mail_to => useremail, :mail_subject => "New announcement waiting for approval 待審核公告 : #{announcement.title}.", :template => "email/announcement_email.html.erb", :template_data => {"html" => datatosend})
email = Email.new(:mail_to => useremail, :mail_subject => " #{t("announcement.announcement_subject")} : #{announcement.title}.", :template => "email/announcement_email.html.erb", :template_data => {"html" => datatosend})
email.deliver rescue nil
end

View File

@ -24,10 +24,14 @@ en:
approve_bulletin_fail: Approval Fail
approve_bulletin_success: Approve Successfully
approval_waiting: Approval
submitted_new_announcement: submitted a new announcement waiting for your approval.
click_here_to_see: Please click here to view the announcement.
submitted_new_announcement: "%{poster} submitted a new announcement waiting for your approval."
click_here_to_see: Please click the link below to view the announcement.
rejected_annoucement: has rejected your announcement, because
updated_annoucement: updated the rejected announcement.
updated_annoucement: "%{poster} updated the rejected announcement."
announcement_subject: New announcement waiting for approval
approval_site: Site
approval_mail_hi: Hello %{name},
approval_announcement_title: Announcement Title
bulletins: Bulletins
categories: Categories
create_bulletin_success: Create Bulletin Successfully

View File

@ -24,10 +24,14 @@ zh_tw:
approve_bulletin_fail: 審核失敗
approve_bulletin_success: 審核成功
approval_waiting: 審核
submitted_new_announcement: 送出了一個新的公告等待您的審核。
click_here_to_see: 點選此處瀏覽該公告。
submitted_new_announcement: 貴單位於全球資訊網有一則 %{poster} 張貼的最新消息待您審核發布,
click_here_to_see: 請您點擊以下網址,前往審核
rejected_annoucement: 未通過您的公告審核,原因為
updated_annoucement: 重新編輯了被拒絕的公告
updated_annoucement: 貴單位於全球資訊網有一則 %{poster} 被拒絕的最新消息已重新編輯待您審核發布,
announcement_subject: 系統訊息 - 最新消息內容審核通知
approval_mail_hi: 親愛的 %{name} 主管您好
approval_site: 網址
approval_announcement_title: 消息標題
bulletins: 公告
categories: 類別
create_bulletin_success: 建立公告成功