diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 61f6fd3..ebd2ece 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -18,6 +18,7 @@ class AnnouncementsController < ApplicationController "postdate" => a.postdate, "link_to_show" => OrbitHelper.url_to_show(a.to_param), "img_src" => a.image.thumb.url || "http://placehold.it/100x100", + "img_description" => a.image_description, "more" => t(:more_plus) } end @@ -54,6 +55,7 @@ class AnnouncementsController < ApplicationController "postdate" => a.postdate, "link_to_show" => OrbitHelper.widget_item_url(a.to_param), "img_src" => a.image.thumb.url || "http://placehold.it/100x100", + "img_description" => a.image_description } end { diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 7f48cbb..601146a 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -26,6 +26,7 @@ class Bulletin field :email_sentdate , :type => DateTime field :email_member_ids field :other_mailaddress + field :image_description, localize: true mount_uploader :image, ImageUploader diff --git a/app/views/admin/announcements/_form.html.erb b/app/views/admin/announcements/_form.html.erb index a6106d8..0f64704 100644 --- a/app/views/admin/announcements/_form.html.erb +++ b/app/views/admin/announcements/_form.html.erb @@ -115,9 +115,20 @@ + <% @site_in_use_locales.each do |locale| %> + <%= f.fields_for :image_description_translations do |f| %> +