shows always whatsapp icon on small screens

This commit is contained in:
Alberto Garcia Cabeza
2017-05-03 18:07:23 +02:00
parent 43e4ec7b44
commit e2a015c24e
4 changed files with 20 additions and 24 deletions

View File

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