fix announcement image info and mail subject

This commit is contained in:
Spen 2013-11-05 16:05:16 +08:00 committed by Manson Wang
parent 048f67c6da
commit 4de72cd26b
4 changed files with 22 additions and 13 deletions

View File

@ -159,12 +159,12 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
respond_to do |format| respond_to do |format|
if @bulletin.save if @bulletin.save
# if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected
# send_email_data(@bulletin) send_email_data(@bulletin)
# @bulletin.email_sent = false @bulletin.email_sent = false
# @bulletin.save @bulletin.save
# end end
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) } format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) }
format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin } format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin }
@ -249,12 +249,12 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
@bulletin.de_pending! @bulletin.de_pending!
end end
# if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected
# send_email_data(@bulletin) send_email_data(@bulletin)
# @bulletin.email_sent = false @bulletin.email_sent = false
# @bulletin.save @bulletin.save
# end end
# if (params[:bulletin][:is_checked] == "false") # if (params[:bulletin][:is_checked] == "false")
# @bulletin.is_rejected = true # @bulletin.is_rejected = true
@ -403,6 +403,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
:mail_from_app => 'announcement', :mail_from_app => 'announcement',
:mail_from => @user.email, :mail_from => @user.email,
:mail_reply_to => @user.email, :mail_reply_to => @user.email,
:mail_subject => "#{t("announcement.mail_subject")}",
:mail_subject => "#{t("announcement.mail_subject",:site_title => @site.title)}#{bulletin.title}", :mail_subject => "#{t("announcement.mail_subject",:site_title => @site.title)}#{bulletin.title}",
:mail_to => @group_mail.join(','), :mail_to => @group_mail.join(','),
:mail_content => @mail_content , :mail_content => @mail_content ,

View File

@ -22,7 +22,11 @@
<img class="pull-left upload-picture" src="/assets/default-img.png" /> <img class="pull-left upload-picture" src="/assets/default-img.png" />
<% end %> <% end %>
</div> </div>
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px x 230px") %></span> <span class="alert widgetInfo">
<%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px(w) x 230px(h)") %>
<br />
<%= t("announcement.image_upload_size_note", :image_upload_size =>'900kb') %>
</span>
<div class="controls file-upload input-prepend"> <div class="controls file-upload input-prepend">
<%= t(:browse) %> <%= t(:browse) %>
<%= f.file_field :image, :id => "input-upload", :class => '', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %> <%= f.file_field :image, :id => "input-upload", :class => '', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>

View File

@ -49,11 +49,13 @@ en:
email_group_data_2: Postgraduates email_group_data_2: Postgraduates
email_group_data_3: Continuing Ed. Postgraduates email_group_data_3: Continuing Ed. Postgraduates
email_group_data_4: Other email_group_data_4: Other
mail_subject: this is an announcement reminder from【%{site_title}】 # mail_subject: this is an announcement reminder from【%{site_title}】
mail_subject: 【北教大公告提醒】
other_mailaddress: Other Email other_mailaddress: Other Email
other_mailaddress_note: Divide different email accounts with "," other_mailaddress_note: Divide different email accounts with ","
mail_hi: Hi mail_hi: Hi
mail_url_view: This email is the reminder of an announcement, please click the link for the details mail_url_view: This email is the reminder of an announcement, please click the link for the details
mail_source: Source mail_source: Source
mail_time: Time mail_time: Time
image_upload_size_note: The following recommendations %{image_upload_size} upload size

View File

@ -51,10 +51,12 @@ zh_tw:
email_group_data_2: 日間部研究生 email_group_data_2: 日間部研究生
email_group_data_3: 進修部研究生 email_group_data_3: 進修部研究生
email_group_data_4: 其他 email_group_data_4: 其他
mail_subject: 來自【%{site_title}】的公告事件提醒 # mail_subject: 來自【%{site_title}】的公告事件提醒
mail_subject: 【北教大公告提醒】
mail_hi: 您好 mail_hi: 您好
mail_url_view: 此封信件為公告事件提醒,請點選以下連結詳細觀看 mail_url_view: 此封信件為公告事件提醒,請點選以下連結詳細觀看
mail_source: 來源 mail_source: 來源
mail_time: 時間 mail_time: 時間
image_upload_size_note: 建議檔案小於%{image_upload_size}