diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb
index 576e284..7187078 100644
--- a/app/controllers/announcements_controller.rb
+++ b/app/controllers/announcements_controller.rb
@@ -340,6 +340,7 @@ class AnnouncementsController < ApplicationController
img_src = nil
subtitle_ann = announcement.subtitle if announcement.display_subtitle?
img_src = (announcement.image.thumb.url || "/assets/announcement-default.jpg") if announcement.display_img?
+ img_description = announcement.image_description if announcement.image_description.present?
{
"tags" => tags,
@@ -353,6 +354,7 @@ class AnnouncementsController < ApplicationController
"body" =>announcement.text,
"image" => announcement.image.url,
"img_src" => img_src,
+ "img_description" => img_description,
"alt_title" => desc
},
"impressionist" => (announcement.is_preview ? nil : announcement),
diff --git a/app/views/admin/announcements/_form.html.erb b/app/views/admin/announcements/_form.html.erb
index 96b6587..62ebf88 100644
--- a/app/views/admin/announcements/_form.html.erb
+++ b/app/views/admin/announcements/_form.html.erb
@@ -69,7 +69,7 @@
- <%= f.label :display_subtitle, 'display subtitle', :class => "control-label muted" %>
+ <%= f.label :display_subtitle, t("announcement.display_subtitle"), :class => "control-label muted" %>
<%= f.check_box :display_subtitle %>
@@ -77,7 +77,7 @@
- <%= f.label :display_img, 'display img src', :class => "control-label muted" %>
+ <%= f.label :display_img, t("announcement.display_img"), :class => "control-label muted" %>
<%= f.check_box :display_img %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5c2479a..550dd01 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -93,4 +93,6 @@ en:
resend_mail: Re-send Email
is_external_link: Enable External Link
external_link: External Link
- external_link_hint: "Make sure URL starts with http://"
\ No newline at end of file
+ external_link_hint: "Make sure URL starts with http://"
+ display_subtitle: Display Subtitle
+ display_img: Display Cover Image
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index a64f0fe..5980d73 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -98,3 +98,5 @@ zh_tw:
is_external_link: 連結外部網址
external_link: 外部連結
external_link_hint: "確定連結開頭為http://"
+ display_subtitle: 顯示副標題
+ display_img: 顯示圖片