index.html.erb 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <div class='container'>
  2. <div class='row'>
  3. <div class='col-md-12'>
  4. <div class="page-header">
  5. <h2>
  6. Your Services
  7. </h2>
  8. </div>
  9. <p>
  10. Before you can authenticate with a service, you need to set it up. Have a look at the Huginn
  11. <%= link_to 'wiki', 'https://github.com/cantino/huginn/wiki/Configuring-OAuth-applications', target: :_blank %>
  12. for guidance.
  13. </p>
  14. <% if has_oauth_configuration_for?('twitter') %>
  15. <p><%= link_to "Authenticate with Twitter", "/auth/twitter" %></p>
  16. <% end %>
  17. <% if has_oauth_configuration_for?('thirty_seven_signals') %>
  18. <p><%= link_to "Authenticate with 37Signals (Basecamp)", "/auth/37signals" %></p>
  19. <% end -%>
  20. <% if has_oauth_configuration_for?('github') %>
  21. <p><%= link_to "Authenticate with Github", "/auth/github" %></p>
  22. <% end -%>
  23. <hr>
  24. <div class='table-responsive'>
  25. <table class='table table-striped events'>
  26. <tr>
  27. <th><%= sortable_column 'provider', 'asc' %></th>
  28. <th><%= sortable_column 'name', 'asc' %></th>
  29. <th><%= sortable_column 'global', name: 'Global?' %></th>
  30. <th></th>
  31. </tr>
  32. <% @services.each do |service| %>
  33. <tr>
  34. <td><%= service.provider %></td>
  35. <td><%= service.name %></td>
  36. <td><%= service.global ? 'Yes' : 'No' %></td>
  37. <td>
  38. <div class="btn-group btn-group-xs">
  39. <% if service.global %>
  40. <%= 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" %>
  41. <% else %>
  42. <%= 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" %>
  43. <% end %>
  44. <%= link_to 'Delete', service_path(service), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-default btn-danger" %>
  45. </div>
  46. </td>
  47. </tr>
  48. <% end %>
  49. </table>
  50. </div>
  51. <%= paginate @services, :theme => 'twitter-bootstrap-3' %>
  52. </div>
  53. </div>
  54. </div>