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

Version Path
contour-2.7.0 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.7.0.beta1 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.rc app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta8 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta7 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta6 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta5 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta4 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta3 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta2 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.6.0.beta1 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.5.0 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.5.0.beta1 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.4.0 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.4.0.rc2 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.4.0.rc app/views/contour/authentications/_add_remove_table.html.erb
contour-2.4.0.beta3 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.4.0.beta2 app/views/contour/authentications/_add_remove_table.html.erb
contour-2.4.0.beta1 app/views/contour/authentications/_add_remove_table.html.erb