Social share buttons for annotation

This commit is contained in:
Amaia Castro
2017-02-09 15:32:42 +01:00
parent 5d060d6d8c
commit d656de680d
5 changed files with 18 additions and 11 deletions

View File

@@ -8,6 +8,10 @@
<div class="draft-panels small-12 column row">
<%= render 'version_chooser', process: @process, draft_version: @draft_version %>
<div class="social-share-full">
<%= render '/legislation/shared/share_buttons', title: @annotation.quote %>
</div>
<div class="row">
<div class="small-12 medium-12 column legislation-comment">
<div class="annotation-comment">

View File

@@ -39,11 +39,7 @@
<div id="social-share" class="sidebar-divider"></div>
<h3><%= t('.share') %></h3>
<div class="social-share-full">
<div class="social-share-button" data-title="<%= @question.title.truncate(115) %>" data-img="" data-url="" data-desc="" data-via="">
<a rel="nofollow " data-site="twitter" class="ssb-icon ssb-twitter" onclick="return SocialShareButton.share(this);" title="<%= t('.share_twitter') %>" href="#"><span class="sr-only">twitter</span></a>
<a rel="nofollow " data-site="facebook" class="ssb-icon ssb-facebook" onclick="return SocialShareButton.share(this);" title="<%= t('.share_facebook') %>" href="#"><span class="sr-only">facebook</span></a>
<a rel="nofollow " data-site="google_plus" class="ssb-icon ssb-google_plus" onclick="return SocialShareButton.share(this);" title="<%= t('.share_gplus') %>" href="#"><span class="sr-only">google_plus</span></a>
</div>
<%= render '/legislation/shared/share_buttons', title: @question.title %>
</div>
</aside>
</div>

View File

@@ -0,0 +1,5 @@
<div class="social-share-button" data-title="<%= title.truncate(115) %>" data-img="" data-url="" data-desc="" data-via="">
<a rel="nofollow " data-site="twitter" class="ssb-icon ssb-twitter" onclick="return SocialShareButton.share(this);" title="<%= t('legislation.shared.share_twitter') %>" href="#"><span class="sr-only">twitter</span></a>
<a rel="nofollow " data-site="facebook" class="ssb-icon ssb-facebook" onclick="return SocialShareButton.share(this);" title="<%= t('legislation.shared.share_facebook') %>" href="#"><span class="sr-only">facebook</span></a>
<a rel="nofollow " data-site="google_plus" class="ssb-icon ssb-google_plus" onclick="return SocialShareButton.share(this);" title="<%= t('legislation.shared.share_gplus') %>" href="#"><span class="sr-only">google_plus</span></a>
</div>

View File

@@ -98,9 +98,6 @@ en:
next_question: Next question
first_question: First question
share: Share
share_twitter: Share on Twitter
share_facebook: Share on Facebook
share_gplus: Share on Google+
title: Collaborative legislation process
participation:
phase_not_open: This phase is not open
@@ -111,3 +108,7 @@ en:
verified_only: Only verified users can participate, %{verify_account}.
verify_account: verify your account
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
shared:
share_twitter: Share on Twitter
share_facebook: Share on Facebook
share_gplus: Share on Google+

View File

@@ -98,9 +98,6 @@ es:
next_question: Siguiente pregunta
first_question: Primera pregunta
share: Compartir
share_twitter: Compartir en Twitter
share_facebook: Compartir en Facebook
share_gplus: Compartir en Google+
title: Proceso de legislación colaborativa
participation:
phase_not_open: Esta fase no está abierta
@@ -111,3 +108,7 @@ es:
verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}.
verify_account: verifica tu cuenta
debate_phase_not_open: La fase de debate previo ya ha finalizado y en este momento no se aceptan respuestas
shared:
share_twitter: Compartir en Twitter
share_facebook: Compartir en Facebook
share_gplus: Compartir en Google+