2012-09-12 15:56:44 +00:00
|
|
|
module ProfileHelper
|
2014-09-25 22:07:40 +00:00
|
|
|
def oauth_active_class(provider)
|
2014-11-25 16:15:30 +00:00
|
|
|
if current_user.identities.exists?(provider: provider.to_s)
|
2012-09-12 15:56:44 +00:00
|
|
|
'active'
|
|
|
|
end
|
|
|
|
end
|
2013-09-03 21:53:01 +00:00
|
|
|
|
|
|
|
def show_profile_username_tab?
|
|
|
|
current_user.can_change_username?
|
|
|
|
end
|
|
|
|
|
|
|
|
def show_profile_social_tab?
|
2014-11-27 11:34:39 +00:00
|
|
|
enabled_social_providers.any?
|
2013-09-03 21:53:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def show_profile_remove_tab?
|
2015-01-08 22:26:43 +00:00
|
|
|
signup_enabled?
|
2013-09-03 21:53:01 +00:00
|
|
|
end
|
2012-09-12 15:56:44 +00:00
|
|
|
end
|