Commit 7826b2f7ef19be8bebfb66eaa1d2ce6fd44a33a9

Authored by Matheus Miranda Lacerda
1 parent cd9d8da6

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>

Conflicts:
	plugins/oauth_client/views/auth/_oauth_login.html.erb
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}&action=#{action}", :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:') %>
4   - <% 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}&action=external_login", :class => provider.strategy, :title => provider.name %>
8   - </span>
  3 + <div class="providers-links">
  4 + <%= _('Create an account from:') %>
  5 + <div>
  6 + <%= render :partial => 'auth/generate_providers_links', :locals => {:providers => providers, :action => ""} %>
  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, :action => "external_login"} %>
  12 + </div>
  13 + <% end %>
  14 + </div>
9 15 <% end %>
10 16  
11 17 <span class="provider">
... ...