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
|
def show
|
||||||
@item = Page.find(params[:page_id]) rescue nil
|
@item = Page.find(params[:page_id]) rescue nil
|
||||||
|
@fb_share = eval(params[:facebook_share]) rescue false
|
||||||
if params[:preview] == "true"
|
if params[:preview] == "true"
|
||||||
preview_content
|
preview_content
|
||||||
else
|
else
|
||||||
|
|
|
@ -39,9 +39,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= share_links(@bulletin, 'announcement') %>
|
<%= share_links(@bulletin, 'announcement') %>
|
||||||
<a href="" target="_blank" class="fb-share-button">
|
<% if @fb_share %>
|
||||||
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
|
<a href="" target="_blank" class="fb-share-button">
|
||||||
</a>
|
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(){
|
(function(){
|
||||||
|
|
|
@ -38,6 +38,7 @@ module Announcement
|
||||||
enable ["typeA", "typeB_style3", "typeC"]
|
enable ["typeA", "typeB_style3", "typeC"]
|
||||||
image :image
|
image :image
|
||||||
field :postdate
|
field :postdate
|
||||||
|
facebook_enabled false
|
||||||
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
|
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]}}
|
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
|
||||||
field :subtitle
|
field :subtitle
|
||||||
|
|
Loading…
Reference in New Issue