From eb5cfe989afa36ec1d4f9927d0f06cf15674d7cb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 11 May 2015 18:20:30 +0800 Subject: [PATCH] alt text mods --- app/controllers/ad_banners_controller.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/ad_banners_controller.rb b/app/controllers/ad_banners_controller.rb index e7ebcb3..648f36c 100644 --- a/app/controllers/ad_banners_controller.rb +++ b/app/controllers/ad_banners_controller.rb @@ -18,12 +18,13 @@ class AdBannersController < ApplicationController image_link = OrbitHelper.is_mobile_view ? b.file.mobile.url : b.file.url klass = i == 0 ? "active" : "" caption = i == 0 ? '
' : "" - title = (b.title.nil? || b.title == "" ? "ad-banner image" : b.title) + alt_text = (b.title.nil? || b.title == "" ? "ad-banner image" : b.title) images << { "image_link" => image_link, - "title" => title, + "title" => b.title, "class" => klass, + "alt_text" => alt_text, "height" => adbanner.height, "width" => adbanner.width, "caption" => caption, @@ -49,13 +50,13 @@ class AdBannersController < ApplicationController adbanner.ad_images.can_display.each_with_index do |ad_b,i| if ad_b.language_enabled.include?(I18n.locale.to_s) image_link = OrbitHelper.is_mobile_view ? ad_b.file.mobile.url : ad_b.file.url - title = (ad_b.title.nil? || ad_b.title == "" ? "ad-banner image" : ad_b.title) + alt_text = (ad_b.title.nil? || ad_b.title == "" ? "ad-banner image" : ad_b.title) caption = i == 0 ? '
' : "" klass = i == 0 ? "active" : "" if ad_b.exchange_item == "1" - image_html = "
#{title}
" + image_html = "
#{ad_b.title}
" else ad_b.exchange_item == "2" - image_html = "
#{title}
#{title}
" + image_html = "
#{ad_b.title}
#{ad_b.title}
" end images << { "html" => image_html