]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth_clients/index.html.erb
Convert account setting menu to tabs, and include on other pages
[rails.git] / app / views / oauth_clients / index.html.erb
1 <% content_for :heading do %>
2   <h1><%= t ".title" %></h1>
3 <% end %>
4
5 <%= render :partial => "settings_menu" %>
6
7 <% unless @tokens.empty? %>
8 <h3><%= t ".my_tokens" %></h3>
9 <p><%= t ".list_tokens" %></p>
10 <table class="table table-sm">
11   <thead>
12     <tr>
13       <th><%= t ".application" %></th>
14       <th><%= t ".issued_at" %></th>
15       <th>&nbsp;</th>
16     </tr>
17   </thead>
18   <% @tokens.each do |token| %>
19     <tr>
20       <td><%= link_to token.client_application.name, token.client_application.url %></td>
21       <td><%= token.authorized_at %></td>
22       <td>
23         <%= form_tag({ :controller => "oauth", :action => "revoke" }) do %>
24           <%= hidden_field_tag "token", token.token, :autocomplete => "off" %>
25           <%= submit_tag t(".revoke"), :class => "btn btn-sm btn-primary" %>
26         <% end %>
27       </td>
28     </tr>
29   <% end %>
30 </table>
31 <% end %>
32 <h3><%= t ".my_apps" %></h3>
33 <% if @client_applications.empty? %>
34 <p><%= t(".no_apps_html", :oauth => link_to(t(".oauth"), "https://oauth.net")) %></p>
35 <% else %>
36 <p><%= t ".registered_apps" %></p>
37 <% @client_applications.each do |client| %>
38   <div class="client_application">
39     <%= link_to client.name, :action => :show, :id => client.id %>
40   </div>
41 <% end %>
42 <% end %>
43 <h3><%= link_to t(".register_new"), :action => :new %></h3>