From a7d1cdbb7516ee3a1c5a0aacece24d653c138386 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 11 Jan 2013 11:28:13 +0800 Subject: [PATCH] Fix for link in ad banner --- app/helpers/front_helper.rb | 4 ++-- app/views/front/show_banner.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/front_helper.rb b/app/helpers/front_helper.rb index b44f28f2..6a276d96 100644 --- a/app/helpers/front_helper.rb +++ b/app/helpers/front_helper.rb @@ -2,8 +2,8 @@ module FrontHelper def ad_image_link(ad_image) link = ad_image.out_link - link =front_show_inner_ad_image_path(:id=> ad_image.id) if link.blank? && !ad_image.context.blank? - + link = front_show_inner_ad_image_path(:id=> ad_image.id) if link.blank? && !ad_image.context.blank? + link end end \ No newline at end of file diff --git a/app/views/front/show_banner.html.erb b/app/views/front/show_banner.html.erb index 10dee26a..491dbe72 100644 --- a/app/views/front/show_banner.html.erb +++ b/app/views/front/show_banner.html.erb @@ -19,7 +19,7 @@
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %> <% if ad_image.display? %> - <%= ad_image.title || ' title='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= ad_image_link(ad_image)%>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/> + <%= ad_image.title || ' title='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= ad_image_link(ad_image) %>' style=' <%= 'cursor:pointer;' if !ad_image_link(ad_image).blank? %>'/> <% end %> <% end %>