Merge pull request #1513 from consul/whatsapp

Whatsapp
This commit is contained in:
Raimond Garcia
2017-05-03 19:54:13 +02:00
committed by GitHub
4 changed files with 20 additions and 24 deletions

View File

@@ -102,12 +102,11 @@
<h2><%= t("budgets.investments.show.share") %></h2> <h2><%= t("budgets.investments.show.share") %></h2>
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <a href="whatsapp://send?text=<%= investment.title.gsub(/\s/, '%20') %>&nbsp;<%= budget_investment_url(budget_id: investment.budget_id, id: investment.id) %>"
<a href="whatsapp://send?text=<%= investment.title.gsub(/\s/, '&nbsp;') %>&nbsp;<%= budget_investment_url(budget_id: investment.budget_id, id: investment.id) %>" data-action="share/whatsapp/share"> class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>
<% end %>
</div> </div>
</aside> </aside>
</div> </div>

View File

@@ -52,12 +52,11 @@
<h2><%= t("debates.show.share") %></h2> <h2><%= t("debates.show.share") %></h2>
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{@debate.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{@debate.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <a href="whatsapp://send?text=<%= @debate.title.gsub(/\s/, '%20') %>&nbsp;<%= debate_url(@debate) %>"
<a href="whatsapp://send?text=<%= @debate.title.gsub(/\s/, '&nbsp;') %>&nbsp;<%= debate_url(@debate) %>" data-action="share/whatsapp/share"> class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>
<% end %>
</div> </div>
</aside> </aside>
</div> </div>

View File

@@ -131,12 +131,11 @@
<h2><%= t("proposals.show.share") %></h2> <h2><%= t("proposals.show.share") %></h2>
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <a href="whatsapp://send?text=<%= @proposal.title.gsub(/\s/, '%20') %>&nbsp;<%= proposal_url(@proposal) %>"
<a href="whatsapp://send?text=<%= @proposal.title.gsub(/\s/, '&nbsp;') %>&nbsp;<%= proposal_url(@proposal) %>" data-action="share/whatsapp/share"> class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>
<% end %>
</div> </div>
</aside> </aside>
</div> </div>

View File

@@ -44,12 +44,11 @@
<h3><%= t("spending_proposals.show.share") %></h3> <h3><%= t("spending_proposals.show.share") %></h3>
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{@spending_proposal.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{@spending_proposal.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <a href="whatsapp://send?text=<%= @spending_proposal.title.gsub(/\s/, '%20') %>&nbsp;<%= spending_proposal_url(@spending_proposal) %>"
<a href="whatsapp://send?text=<%= @spending_proposal.title.gsub(/\s/, '&nbsp;') %>&nbsp;<%= spending_proposal_url(@spending_proposal) %>" data-action="share/whatsapp/share"> class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>
<% end %>
</div> </div>
</aside> </aside>