Refactor share buttons partial to use gem helper
This commit is contained in:
@@ -15,9 +15,10 @@
|
||||
</div>
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2>Compartir</h2>
|
||||
<div class="social-share-full">
|
||||
<%= render '/legislation/shared/share_buttons', title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title) %>
|
||||
</div>
|
||||
<h2><%= t('legislation.shared.share') %></h2>
|
||||
<%= render '/legislation/shared/share_buttons',
|
||||
title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title),
|
||||
url: legislation_process_draft_version_path(process, draft_version)
|
||||
%>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2>Compartir</h2>
|
||||
<div class="social-share-full">
|
||||
<%= render '/legislation/shared/share_buttons', title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title) %>
|
||||
</div>
|
||||
<h2><%= t('legislation.shared.share') %></h2>
|
||||
<%= render '/legislation/shared/share_buttons',
|
||||
title: t('legislation.shared.share_comment', version_name: @draft_version.title.downcase, process_name: @process.title),
|
||||
url: legislation_process_draft_version_annotations_path(@process, @draft_version)
|
||||
%>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div id="social-share" class="sidebar-divider"></div>
|
||||
<h3><%= t('.share') %></h3>
|
||||
<div class="social-share-full">
|
||||
<%= render '/legislation/shared/share_buttons', title: @question.title %>
|
||||
</div>
|
||||
<%= render '/legislation/shared/share_buttons', title: @question.title, url: legislation_process_question_url(@question.process, @question) %>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<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 class="social-share-full">
|
||||
<%= social_share_button_tag("#{title} #{setting['twitter_hashtag']}") %>
|
||||
<% if browser.device.mobile? %>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user