diaspora/app/helpers/publisher_helper.rb
Lukas Matt 267d91bf66 Changes for a successful facebook review
I had two facebook reviews in the past days
Removing the display type and adding a explicit
'Share to' provider tag did the trick

Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>
2016-03-30 10:36:28 +02:00

29 lines
1 KiB
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module PublisherHelper
def remote?
params[:controller] != "tags"
end
def all_aspects_selected?(selected_aspects)
@all_aspects_selected ||= all_aspects.size == selected_aspects.size
end
def service_button(service)
share_to = I18n.t "services.index.share_to"
content_tag :div,
class: "btn btn-link service_icon dim",
title: "#{share_to} #{service.provider.titleize} (#{service.nickname})",
id: "#{service.provider}",
maxchar: "#{service.class::MAX_CHARACTERS}",
data: {toggle: "tooltip", placement: "bottom"} do
if service.provider == "wordpress"
content_tag(:span, "", class: "social-media-logos-wordpress-16x16")
else
content_tag(:i, "", class: "entypo-social-#{ service.provider } small")
end
end
end
end