Commit c1a7c9dcb02ee24a9be44ecb7b381ca293caece4
1 parent
80776b89
Exists in
master
and in
11 other branches
proposals_discussion: facebook share button
Showing
3 changed files
with
13 additions
and
0 deletions
Show diff stats
public/proposals_list.js
... | ... | @@ -30,3 +30,12 @@ jQuery(document).ready(function($) { |
30 | 30 | }); |
31 | 31 | $('.topics').masonry(); |
32 | 32 | }); |
33 | + | |
34 | + | |
35 | +(function(d, s, id) { | |
36 | + var js, fjs = d.getElementsByTagName(s)[0]; | |
37 | + if (d.getElementById(id)) return; | |
38 | + js = d.createElement(s); js.id = id; | |
39 | + js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.0"; | |
40 | + fjs.parentNode.insertBefore(js, fjs); | |
41 | +}(document, 'script', 'facebook-jssdk')); | ... | ... |
views/content_viewer/_proposals_list.html.erb
views/content_viewer/_social.html.erb
1 | 1 | <% if proposal.published? %> |
2 | 2 | <a href="https://twitter.com/share" class="twitter-share-button" data-url="<%= url_for proposal.view_url %>" data-text="<%= proposal.title %>" data-count="none"></a> |
3 | + | |
4 | + <div class="fb-share-button" data-href="<%= url_for proposal.view_url %>" data-layout="box-count"></div> | |
3 | 5 | <% end %> | ... | ... |