- Widgets for announcement
  - Facebook link
  - AdBanner nav
This commit is contained in:
chris committed 2012-11-21 18:42:14 +08:00
1 parent bfa6579aad
commit 2d0e8b37b2
5 files changed
+35 -12

No files matched your search

+5 -5
View File
@@ -260,12 +260,12 @@ module ApplicationHelper
end
def share_links(object, key)
js = ''
js << "<meta property='og:title' content='#{object.title}' />\n" rescue ''
js << "<meta property='og:description' content='#{object.subtitle}' />\n" rescue ''
js << "<meta property='og:image' content='#{object.image.url}' />\n" rescue ''
# js = ''
# js << "<meta property='og:title' content='#{object.title}' />\n" rescue ''
# js << "<meta property='og:description' content='#{object.subtitle}' />\n" rescue ''
# js << "<meta property='og:image' content='#{object.image.url}' />\n" rescue ''
content_tag :div, :class => 'fb' do
concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url}")
concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url if !object.image.blank?}")
# concat javascript_tag "$('head').append('#{j js}');"
end
end