]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/oauth_clients/index.html.erb
Rename traces#view to traces#show
[rails.git] / app / views / oauth_clients / index.html.erb
index 8f9e0a0b1da03b89a8bbe4ad2bbe4dad39712312..64a316718a9f709239c360779cd5ef4f40be3918 100644 (file)
@@ -1,39 +1,36 @@
-<div class="flash"><%= flash[:notice] %></div>
-<h1>OAuth Client Applications</h1>
+<% content_for :heading do %>
+  <h1><%= t '.title' %></h1>
+<% end %>
+
 <% unless @tokens.empty? %>
-<p>The following tokens have been issued to applications in your name</p>
+<h3><%= t '.my_tokens' %></h3>
+<p><%= t '.list_tokens' %></p>
 <table>
-  <tr><th>Application</th><th>Issued</th><th>&nbsp;</th></tr>
+  <tr><th><%= t '.application' %></th>
+    <th><%= t '.issued_at' %></th><th>&nbsp;</th></tr>
   <% @tokens.each do |token|%>
-    <% content_tag_for :tr, token do %>
+    <%= content_tag_for :tr, token do %>
       <td><%= link_to token.client_application.name, token.client_application.url %></td>
       <td><%= token.authorized_at %></td>
       <td>
-       <% form_tag :controller => 'oauth', :action => 'revoke' do %>
+       <%= form_tag :controller => 'oauth', :action => 'revoke' do %>
        <%= hidden_field_tag 'token', token.token %>
-       <%= submit_tag "Revoke!" %>
+       <%= submit_tag t('.revoke') %>
        <% end %>
       </td>
     <% end %>
-  <% end %>    
+  <% end %>
 </table>
 <% end %>
-<h3>Application Developers</h3>
+<h3><%= t '.my_apps' %></h3>
 <% if @client_applications.empty? %>
-       <p>
-               Do you have an application you would like to register for use with us using the <a href="http://oauth.net">OAuth</a> standard?
-       </p>
-       <p>
-               You must register your web application before it can make OAuth requests to this service
-       </p>
+<p><%= raw(t('.no_apps', :oauth => "<a href=\"https://oauth.net\">OAuth</a>")) %></p>
 <% else %>
-       <p>
-               You have the following client applications registered:
-       </p>
-       <% @client_applications.each do |client|%>
-               <% div_for client do %>
-                       <%= link_to client.name, :action => :show, :id => client.id %>
-               <% end %>
-       <% end %>
+<p><%= t '.registered_apps' %></p>
+<% @client_applications.each do |client|%>
+  <%= div_for client do %>
+    <%= link_to client.name, :action => :show, :id => client.id %>
+  <% end %>
+<% end %>
 <% end %>
-<h3><%= link_to "Register your application", :action => :new %></h3>
+<h3><%= link_to t('.register_new'), :action => :new %></h3>