facebook toggle added in the gem. can now set facebook sharing enabled or disabled using facebook_enabled true/false

This commit is contained in:
Harry Bomrah 2014-02-24 14:59:12 +08:00
parent 0af4fb0502
commit 781a49750e
3 changed files with 7 additions and 3 deletions

View File

@ -55,6 +55,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
def show
@item = Page.find(params[:page_id]) rescue nil
@fb_share = eval(params[:facebook_share]) rescue false
if params[:preview] == "true"
preview_content
else

View File

@ -39,9 +39,11 @@
</div>
<%= share_links(@bulletin, 'announcement') %>
<% if @fb_share %>
<a href="" target="_blank" class="fb-share-button">
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
</a>
<% end %>
<script type="text/javascript">
(function(){

View File

@ -38,6 +38,7 @@ module Announcement
enable ["typeA", "typeB_style3", "typeC"]
image :image
field :postdate
facebook_enabled false
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
field :subtitle