Commit da3bed8308c80878fb48369a3052915aac81aa74
1 parent
27d0c62f
Exists in
federation_oauth_provider
Add links to use account from another social network
Signed-off-by: Artur Bersan de Faria <artur_bersan@hotmail.com> Signed-off-by: Matheus Miranda <matheusmirandalacerda@gmail.com>
Showing
2 changed files
with
17 additions
and
12 deletions
Show diff stats
plugins/oauth_client/views/auth/_generate_providers_links.html.erb
0 → 100644
... | ... | @@ -0,0 +1,5 @@ |
1 | +<% providers.each do |provider| %> | |
2 | + <span class="provider"> | |
3 | + <%= link_to provider.image ? image_tag(provider.image.public_filename) : provider.name, "/plugin/oauth_client/#{provider.strategy}?id=#{provider.id}", :class => provider.strategy, :title => provider.name %> | |
4 | + </span> | |
5 | +<% end %> | ... | ... |
plugins/oauth_client/views/auth/_oauth_login.html.erb
1 | 1 | <div class="oauth-login"> |
2 | 2 | <% unless providers.empty? %> |
3 | - <%= _('Login with:') %> | |
3 | + <div class="providers-links"> | |
4 | + <%= _('Use my account from:') %> | |
5 | + <div> | |
6 | + <%= render :partial => 'auth/generate_providers_links', :locals => {:providers => providers} %> | |
7 | + </div> | |
8 | + <% if OauthClientPlugin::Config.instance.create_account_for_login %> | |
9 | + <%= _('Login with:') %> | |
10 | + <div> | |
11 | + <%= render :partial => 'auth/generate_providers_links', :locals => {:providers => providers} %> | |
12 | + </div> | |
13 | + <% end %> | |
14 | + </div> | |
4 | 15 | <% end %> |
5 | - <% providers.each do |provider| %> | |
6 | - <span class="provider"> | |
7 | - <%= link_to provider.image ? image_tag(provider.image.public_filename) : provider.name, "/plugin/oauth_client/#{provider.strategy}?id=#{provider.id}", :class => provider.strategy, :title => provider.name %> | |
8 | - </span> | |
9 | - <% end %> | |
10 | - | |
11 | - <span class="provider"> | |
12 | - <% unless Rails.env.production? %> | |
13 | - <%= link_to _('Developer Login'), "/plugin/oauth_client/developer", :class => 'developer' %> | |
14 | - <% end %> | |
15 | - </span> | |
16 | 16 | </div> | ... | ... |