Refactor share buttons partial to use gem helper
This commit is contained in:
@@ -15,9 +15,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<aside class="small-12 medium-3 column">
|
<aside class="small-12 medium-3 column">
|
||||||
<div class="sidebar-divider"></div>
|
<div class="sidebar-divider"></div>
|
||||||
<h2>Compartir</h2>
|
<h2><%= t('legislation.shared.share') %></h2>
|
||||||
<div class="social-share-full">
|
<%= render '/legislation/shared/share_buttons',
|
||||||
<%= render '/legislation/shared/share_buttons', title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title) %>
|
title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title),
|
||||||
</div>
|
url: legislation_process_draft_version_path(process, draft_version)
|
||||||
|
%>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -32,10 +32,11 @@
|
|||||||
|
|
||||||
<aside class="small-12 medium-3 column">
|
<aside class="small-12 medium-3 column">
|
||||||
<div class="sidebar-divider"></div>
|
<div class="sidebar-divider"></div>
|
||||||
<h2>Compartir</h2>
|
<h2><%= t('legislation.shared.share') %></h2>
|
||||||
<div class="social-share-full">
|
<%= render '/legislation/shared/share_buttons',
|
||||||
<%= render '/legislation/shared/share_buttons', title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title) %>
|
title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title),
|
||||||
</div>
|
url: legislation_process_draft_version_annotations_path(@process, @draft_version)
|
||||||
|
%>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,7 @@
|
|||||||
<aside class="small-12 medium-3 column">
|
<aside class="small-12 medium-3 column">
|
||||||
<div id="social-share" class="sidebar-divider"></div>
|
<div id="social-share" class="sidebar-divider"></div>
|
||||||
<h3><%= t('.share') %></h3>
|
<h3><%= t('.share') %></h3>
|
||||||
<div class="social-share-full">
|
<%= render '/legislation/shared/share_buttons', title: @question.title, url: legislation_process_question_url(@question.process, @question) %>
|
||||||
<%= render '/legislation/shared/share_buttons', title: @question.title %>
|
|
||||||
</div>
|
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<div class="social-share-button" data-title="<%= title.truncate(115) %>" data-img="" data-url="" data-desc="" data-via="">
|
<div class="social-share-full">
|
||||||
<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>
|
<%= social_share_button_tag("#{title} #{setting['twitter_hashtag']}") %>
|
||||||
<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>
|
<% if browser.device.mobile? %>
|
||||||
<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>
|
<a href="whatsapp://send?text=<%= title %> <%= url %>" data-action="share/whatsapp/share">
|
||||||
|
<span class="icon-whatsapp whatsapp"></span>
|
||||||
|
<span class="sr-only"><%= t("social.whatsapp") %></span>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -108,7 +108,5 @@ en:
|
|||||||
verify_account: verify your account
|
verify_account: verify your account
|
||||||
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
|
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
|
||||||
shared:
|
shared:
|
||||||
share_twitter: Share on Twitter
|
share: Share
|
||||||
share_facebook: Share on Facebook
|
|
||||||
share_gplus: Share on Google+
|
|
||||||
share_comment: Comment on %{version_name} from process draft %{process_name}
|
share_comment: Comment on %{version_name} from process draft %{process_name}
|
||||||
|
|||||||
@@ -108,7 +108,5 @@ es:
|
|||||||
verify_account: verifica tu cuenta
|
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
|
debate_phase_not_open: La fase de debate previo ya ha finalizado y en este momento no se aceptan respuestas
|
||||||
shared:
|
shared:
|
||||||
share_twitter: Compartir en Twitter
|
share: Compartir
|
||||||
share_facebook: Compartir en Facebook
|
|
||||||
share_gplus: Compartir en Google+
|
|
||||||
share_comment: Comentario sobre la %{version_name} del borrador del proceso %{process_name}
|
share_comment: Comentario sobre la %{version_name} del borrador del proceso %{process_name}
|
||||||
|
|||||||
Reference in New Issue
Block a user