]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth_clients/index.html.erb
Replace content_tag_for with a simple tr element
[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   <tr>
10     <th><%= t ".application" %></th>
11     <th><%= t ".issued_at" %></th>
12     <th>&nbsp;</th>
13   </tr>
14   <% @tokens.each do |token| %>
15     <tr>
16       <td><%= link_to token.client_application.name, token.client_application.url %></td>
17       <td><%= token.authorized_at %></td>
18       <td>
19         <%= form_tag :controller => "oauth", :action => "revoke" do %>
20           <%= hidden_field_tag "token", token.token %>
21           <%= submit_tag t(".revoke") %>
22         <% end %>
23       </td>
24     </tr>
25   <% end %>
26 </table>
27 <% end %>
28 <h3><%= t ".my_apps" %></h3>
29 <% if @client_applications.empty? %>
30 <p><%= raw(t(".no_apps", :oauth => "<a href=\"https://oauth.net\">OAuth</a>")) %></p>
31 <% else %>
32 <p><%= t ".registered_apps" %></p>
33 <% @client_applications.each do |client| %>
34   <div class="client_application">
35     <%= link_to client.name, :action => :show, :id => client.id %>
36   </div>
37 <% end %>
38 <% end %>
39 <h3><%= link_to t(".register_new"), :action => :new %></h3>