X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cbbfdf394880d29c9a6cc2259fcfd474088fa9bb..606492c3df124092ed119716c5b1cbe922f6b315:/app/views/oauth_clients/index.html.erb diff --git a/app/views/oauth_clients/index.html.erb b/app/views/oauth_clients/index.html.erb index 9f11cddef..b4c2558cf 100644 --- a/app/views/oauth_clients/index.html.erb +++ b/app/views/oauth_clients/index.html.erb @@ -1,33 +1,47 @@ -

<%= t'oauth.client_application.index.title' %>

+<% content_for :heading do %> +

<%= t ".title" %>

+<% end %> + +<%= render :partial => "settings_menu" %> + <% unless @tokens.empty? %> -

<%= t'oauth.client_application.index.my_tokens' %>

-

<%= t'oauth.client_application.index.list_tokens' %>

- - - - <% @tokens.each do |token|%> - <% content_tag_for :tr, token do %> +

<%= t ".my_tokens" %>

+

<%= t ".list_tokens" %>

+
<%= t'oauth.client_application.index.application' %><%= t'oauth.client_application.index.issued_at' %> 
+ + + + + + + + <% @tokens.each do |token| %> + - <% end %> - <% end %> + + <% end %>
<%= t ".application" %><%= t ".issued_at" %> 
<%= link_to token.client_application.name, token.client_application.url %> <%= token.authorized_at %> - <% form_tag :controller => 'oauth', :action => 'revoke' do %> - <%= hidden_field_tag 'token', token.token %> - <%= submit_tag t('oauth.client_application.index.revoke') %> - <% end %> + <%= form_tag({ :controller => "oauth", :action => "revoke" }) do %> + <%= hidden_field_tag "token", token.token, :autocomplete => "off" %> + <%= submit_tag t(".revoke"), :class => "btn btn-sm btn-primary" %> + <% end %>
<% end %> -

<%= t'oauth.client_application.index.my_apps' %>

+

<%= t ".my_apps" %>

<% if @client_applications.empty? %> -

<%= t('oauth.client_application.index.no_apps', :oauth => "OAuth") %>

+

<%= t(".no_apps_html", :oauth => link_to(t(".oauth"), "https://oauth.net")) %>

<% else %> -

<%= t'oauth.client_application.index.registered_apps' %>

-<% @client_applications.each do |client|%> - <% div_for client do %> - <%= link_to client.name, :action => :show, :id => client.id %> +

<%= t ".registered_apps" %>

+ <% end %> -<% end %> -

<%= link_to t('oauth.client_application.index.register_new'), :action => :new %>

+<% if Settings.oauth_10_registration -%> +<%= link_to t(".register_new"), { :action => :new }, :class => "btn btn-outline-primary" %> +<% end -%>