Sha256: e4816ae239a92d40dcfbb6ea1c3a9cb6aabb2fce1de4f60f1f60b52b75929a7e
Contents?: true
Size: 1.3 KB
Versions: 32
Compression:
Stored size: 1.3 KB
Contents
<% if current_user %> <table class="table table-striped" style="table-layout:fixed"> <thead> <tr> <th></th> <th>Provider</th> <th>User ID</th> <th>Actions</th> </tr> </thead> <% PROVIDERS.each do |provider| %> <% url_params = (provider == :google_apps) ? '?domain=gmail.com' : '' %> <% provider_name = OmniAuth.config.camelizations[provider.to_s.downcase] || provider.to_s.titleize %> <% image_name = provider.to_s.downcase %> <% authentication = current_user.authentications.find_by_provider(provider.to_s.downcase) %> <tr> <td><%= image_tag "contour/#{image_name}_32.png", height: '32px' %></td> <td><%= provider_name %></td> <td><%= authentication.uid if authentication %></td> <td> <% if authentication %> <%= link_to 'Remove', authentication, remote: true, method: :delete, class: 'btn btn-xs btn-danger-inverse', data: { confirm: 'Are you sure you want to remove this authentication option?' } %> <% else %> <%= link_to 'Add', "#{request.script_name}/#{OmniAuth.config.path_prefix.split('/').last.to_s}/#{provider.to_s.downcase}#{url_params}", class: 'btn btn-xs btn-default' %> <% end %> </td> </tr> <% end %> </table> <% end %>
Version data entries
32 entries across 32 versions & 1 rubygems