[openstreetmap/openstreetmap-website] Collapse duplicate OAuth authorisations (#1462)

Ilya Zverev notifications at github.com
Thu Feb 23 19:53:05 UTC 2017


Zverik commented on this pull request.



> -  <tr><th><%= t'oauth_clients.index.application' %></th>
-    <th><%= t'oauth_clients.index.issued_at' %></th><th> </th></tr>
-  <% @tokens.each do |token|%>
-    <%= content_tag_for :tr, token do %>
-      <td><%= link_to token.client_application.name, token.client_application.url %></td>
-      <td><%= token.authorized_at %></td>
+<div id="authorised_applications">
+  <h3><%= t'oauth_clients.index.my_tokens' %></h3>
+  <p><%= t'oauth_clients.index.list_tokens' %></p>
+  <table>
+    <tr>
+      <th><%= t'oauth_clients.index.application' %></th>
+      <th><%= t'oauth_clients.index.first_authorised' %></th>
+      <th> </th>
+    </tr>
+    <% @tokens.group_by { |t| t.client_application }.each do |client,tokens|%>

Will the order be random or sorted by name? Is it possible to add an `order` statement to sort by "First authorized"?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1462#pullrequestreview-23569306
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170223/40999bcf/attachment-0001.html>


More information about the rails-dev mailing list