]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/oauth2_authorized_applications/_application.html.erb
Merge pull request #5331 from AntonKhorev/trace-badges-text-bg
[rails.git] / app / views / oauth2_authorized_applications / _application.html.erb
index 3781c1df3f264c3607c73b86b3d185cfbe7e615b..4209b8ff919acb36cc5e1bddd98bb3d707fc92ee 100644 (file)
@@ -1,15 +1,18 @@
 <tr>
   <td class="align-middle">
 <tr>
   <td class="align-middle">
-    <%= link_to application.name, oauth_application_path(application) %>
+    <%= application.name %>
   </td>
   <td class="align-middle">
     <ul class="list-unstyled mb-0">
   </td>
   <td class="align-middle">
     <ul class="list-unstyled mb-0">
-      <% application.scopes.each do |scope| -%>
-        <li><%= t "oauth.scopes.#{scope}" %></li>
+      <% application.authorized_scopes_for(current_user).each do |scope| -%>
+        <li><%= authorization_scope(scope) %></li>
       <% end -%>
     </ul>
   </td>
       <% end -%>
     </ul>
   </td>
-  <td class="align-middle text-right">
+  <td class="align-middle">
+    <%= friendly_date_ago(application.authorized_tokens.where(:resource_owner_id => current_user).maximum(:created_at)) %>
+  </td>
+  <td class="align-middle text-end">
     <%= link_to t(".revoke"), oauth_authorized_application_path(application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_revoke") } } %>
   </td>
 </tr>
     <%= link_to t(".revoke"), oauth_authorized_application_path(application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_revoke") } } %>
   </td>
 </tr>