index.html.erb 2.8KB

    <div class='container'> <div class='row'> <div class='col-md-12'> <div class="page-header"> <h2> Your Services </h2> </div> <p> Before you can authenticate with a service, you need to set it up. Have a look at the Huginn <%= link_to 'wiki', 'https://github.com/cantino/huginn/wiki/Configuring-OAuth-applications', target: :_blank %> for guidance. </p> <% if has_oauth_configuration_for?('twitter') %> <p><%= link_to "/auth/twitter", class: 'btn btn-default btn-auth btn-auth-twitter' do %><i class='fa fa-twitter'></i><span>Authenticate with Twitter</span><% end %></p> <% end %> <% if has_oauth_configuration_for?('37signals') %> <p><%= link_to "/auth/37signals", class: 'btn btn-default btn-auth btn-auth-37signals' do %><i class='fa fa-lock'></i><span>Authenticate with 37Signals (Basecamp)</span><% end %></p> <% end -%> <% if has_oauth_configuration_for?('github') %> <p><%= link_to "/auth/github", class: 'btn btn-default btn-auth btn-auth-github' do %><i class='fa fa-github'></i><span>Authenticate with Github</span><% end %></p> <% end -%> <% if has_oauth_configuration_for('tumblr') %> <p><%= link_to "Authenticate with Tumblr", "/auth/tumblr" %></p> <% end -%> <hr> <div class='table-responsive'> <table class='table table-striped events'> <tr> <th><%= sortable_column 'provider', 'asc' %></th> <th><%= sortable_column 'name', 'asc' %></th> <th><%= sortable_column 'global', name: 'Global?' %></th> <th></th> </tr> <% @services.each do |service| %> <tr> <td><%= service.provider %></td> <td><%= service.name %></td> <td><%= service.global ? 'Yes' : 'No' %></td> <td> <div class="btn-group btn-group-xs"> <% if service.global %> <%= link_to 'Make private', toggle_availability_service_path(service), method: :post, data: { confirm: 'Are you sure you want to remove access to your data on this service for other users?'}, class: "btn btn-default" %> <% else %> <%= link_to 'Make global', toggle_availability_service_path(service), method: :post, data: { confirm: 'Are you sure you want to grant every user on this system access to your data on this service?'}, class: "btn btn-default" %> <% end %> <%= link_to 'Delete', service_path(service), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-default btn-danger" %> </div> </td> </tr> <% end %> </table> </div> <%= paginate @services, :theme => 'twitter-bootstrap-3' %> </div> </div> </div>