Fix ab_banner display

This commit is contained in:
Christophe Vilayphiou 2012-08-15 16:34:00 +08:00
parent c5b95e2e0f
commit 84ad9dd724
1 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ module ParserCommon
end
end
printable_ad_images.shuffle!
hide = printable_ad_images.size > 1
printable_ad_images.each do |ad_image| #TODO Need Reflact
res << "<img src='#{ad_image.file}' "
res << "alt='#{ad_image.title || ' '}' "
@ -80,7 +81,7 @@ module ParserCommon
res << "link_open='#{ad_image.link_open}' "
# res << "link_url='#{(ad_image.direct_to_after_click?? ad_image.out_link : ad_banner.context) || ' '}' "
res << "link_url='#{(ad_image.out_link)}' "
res << "style='display:none; #{'cursor:pointer;' if !ad_image.out_link.blank?}'"
res << "style='#{'display:none;' if hide} #{'cursor:pointer;' if !ad_image.out_link.blank?}'"
res << "/>"
end
res << "</div>"