facebook toggle added in the gem. can now set facebook sharing enabled or disabled using facebook_enabled true/false
This commit is contained in:
parent
0af4fb0502
commit
781a49750e
|
@ -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
|
||||
|
|
|
@ -39,9 +39,11 @@
|
|||
</div>
|
||||
|
||||
<%= share_links(@bulletin, 'announcement') %>
|
||||
<a href="" target="_blank" class="fb-share-button">
|
||||
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
|
||||
</a>
|
||||
<% 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(){
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue