]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth_clients/index.html.erb
Merge remote-tracking branch 'upstream/pull/2494'
[rails.git] / app / views / oauth_clients / index.html.erb
1 <% content_for :heading do %>
2   <h1><%= t ".title" %></h1>
3 <% end %>
4
5 <% unless @tokens.empty? %>
6 <h3><%= t ".my_tokens" %></h3>
7 <p><%= t ".list_tokens" %></p>
8 <table>
9   <thead>
10     <tr>
11       <th><%= t ".application" %></th>
12       <th><%= t ".issued_at" %></th>
13       <th>&nbsp;</th>
14     </tr>
15   </thead>
16   <% @tokens.each do |token| %>
17     <tr>
18       <td><%= link_to token.client_application.name, token.client_application.url %></td>
19       <td><%= token.authorized_at %></td>
20       <td>
21         <%= form_tag :controller => "oauth", :action => "revoke" do %>
22           <%= hidden_field_tag "token", token.token %>
23           <%= submit_tag t(".revoke") %>
24         <% end %>
25       </td>
26     </tr>
27   <% end %>
28 </table>
29 <% end %>
30 <h3><%= t ".my_apps" %></h3>
31 <% if @client_applications.empty? %>
32 <p><%= t(".no_apps_html", :oauth => link_to(t(".oauth"), "https://oauth.net")) %></p>
33 <% else %>
34 <p><%= t ".registered_apps" %></p>
35 <% @client_applications.each do |client| %>
36   <div class="client_application">
37     <%= link_to client.name, :action => :show, :id => client.id %>
38   </div>
39 <% end %>
40 <% end %>
41 <h3><%= link_to t(".register_new"), :action => :new %></h3>