target added to pro

This commit is contained in:
Harry Bomrah 2015-06-02 13:58:58 +08:00
parent 4164a31d10
commit bccfe525de
1 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,11 @@ class AdBannersController < ApplicationController
klass = i == 0 ? "active" : ""
caption = i == 0 ? '<div class="cycle-overlay"></div><div class="cycle-pager"></div>' : ""
alt_text = (b.title.nil? || b.title == "" ? "ad-banner image" : b.title)
if b.link_open == "new_window"
target = "_blank"
else
target = ""
end
images << {
"image_link" => image_link,
"title" => b.title,
@ -27,6 +31,7 @@ class AdBannersController < ApplicationController
"alt_title" => alt_text,
"height" => adbanner.height,
"width" => adbanner.width,
"target" => target,
"caption" => caption,
"context" => b.context,
"link" => b.out_link || "#"