]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth_clients/index.html.erb
Merge 16070:16110 from trunk.
[rails.git] / app / views / oauth_clients / index.html.erb
1 <div class="flash"><%= flash[:notice] %></div>
2 <h1>OAuth Client Applications</h1>
3 <% unless @tokens.empty? %>
4 <p>The following tokens have been issued to applications in your name</p>
5 <table>
6   <tr><th>Application</th><th>Issued</th><th>&nbsp;</th></tr>
7   <% @tokens.each do |token|%>
8     <% content_tag_for :tr, token do %>
9       <td><%= link_to token.client_application.name, token.client_application.url %></td>
10       <td><%= token.authorized_at %></td>
11       <td>
12         <% form_tag :controller => 'oauth', :action => 'revoke' do %>
13         <%= hidden_field_tag 'token', token.token %>
14         <%= submit_tag "Revoke!" %>
15         <% end %>
16       </td>
17     <% end %>
18   <% end %>     
19 </table>
20 <% end %>
21 <h3>Application Developers</h3>
22 <% if @client_applications.empty? %>
23         <p>
24                 Do you have an application you would like to register for use with us using the <a href="http://oauth.net">OAuth</a> standard?
25         </p>
26         <p>
27                 You must register your web application before it can make OAuth requests to this service
28         </p>
29 <% else %>
30         <p>
31                 You have the following client applications registered:
32         </p>
33         <% @client_applications.each do |client|%>
34                 <% div_for client do %>
35                         <%= link_to client.name, :action => :show, :id => client.id %>
36                 <% end %>
37         <% end %>
38 <% end %>
39 <h3><%= link_to "Register your application", :action => :new %></h3>