<h1><%= t ".title" %></h1>
<% end %>
+<% if @applications.length > 0 %>
+ <table class="table table-borderless table-striped">
+ <thead>
+ <th><%= t ".name" %></th>
+ <th><%= t ".permissions" %></th>
+ <th></th>
+ <th></th>
+ </thead>
+ <tbody>
+ <%= render :partial => "application", :collection => @applications %>
+ </tbody>
+ </table>
+<% else %>
+ <p><%= t ".no_applications_html", :oauth2 => link_to(t(".oauth_2"), "https://oauth.net/2/") %></p>
+<% end %>
+
<p>
<%= link_to t(".new"), new_oauth_application_path, :class => "btn btn-outline-primary" %>
</p>
-
-<table class="table table-borderless table-striped">
- <tbody>
- <%= render :partial => "application", :collection => @applications %>
- </tbody>
-</table>
<% end -%>
</ul>
-<div class="container">
- <div class="row justify-content-start">
- <div class="col-auto pl-0">
- <%= bootstrap_form_tag :action => :create do |f| %>
- <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
- <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
- <%= f.hidden_field :state, :value => @pre_auth.state %>
- <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
- <%= f.hidden_field :scope, :value => @pre_auth.scope %>
- <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
- <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
- <%= f.primary t(".authorize") %>
- <% end %>
- </div>
- <div class="col-auto pl-0">
- <%= bootstrap_form_tag :action => :destroy, :html => { :method => :delete } do |f| %>
- <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
- <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
- <%= f.hidden_field :state, :value => @pre_auth.state %>
- <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
- <%= f.hidden_field :scope, :value => @pre_auth.scope %>
- <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
- <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
- <%= f.submit t(".deny") %>
- <% end %>
- </div>
+<div class="row justify-content-start no-gutters mx-n1">
+ <div class="col-auto mx-1">
+ <%= bootstrap_form_tag :action => :create do |f| %>
+ <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
+ <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
+ <%= f.hidden_field :state, :value => @pre_auth.state %>
+ <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
+ <%= f.hidden_field :scope, :value => @pre_auth.scope %>
+ <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
+ <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
+ <%= f.primary t(".authorize") %>
+ <% end %>
+ </div>
+ <div class="col-auto mx-1">
+ <%= bootstrap_form_tag :action => :destroy, :html => { :method => :delete } do |f| %>
+ <%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
+ <%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
+ <%= f.hidden_field :state, :value => @pre_auth.state %>
+ <%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
+ <%= f.hidden_field :scope, :value => @pre_auth.scope %>
+ <%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
+ <%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
+ <%= f.submit t(".deny") %>
+ <% end %>
</div>
</div>
<h1><%= t ".title" %></h1>
<% end %>
-<table class="table table-borderless table-striped">
- <thead>
- <th><%= t ".application" %></th>
- <th><%= t ".permissions" %></th>
- <th></th>
- </thead>
- <tbody>
- <%= render :partial => "application", :collection => @applications %>
- </tbody>
-</table>
+<% if @applications.length > 0 %>
+ <table class="table table-borderless table-striped">
+ <thead>
+ <th><%= t ".application" %></th>
+ <th><%= t ".permissions" %></th>
+ <th></th>
+ </thead>
+ <tbody>
+ <%= render :partial => "application", :collection => @applications %>
+ </tbody>
+ </table>
+<% else %>
+ <p><%= t ".no_applications_html", :oauth2 => link_to(t(".oauth_2"), "https://oauth.net/2/") %></p>
+<% end %>
oauth2_applications:
index:
title: "My client applications"
- new: "Create new application"
+ no_applications_html: "Do you have an application you would like to register for use with us using the %{oauth2} standard? You must register your application before it can make OAuth requests to this service."
+ oauth_2: "OAuth 2"
+ new: "Register new application"
+ name: "Name"
+ permissions: "Permissions"
application:
edit: "Edit"
delete: "Delete"
edit:
title: "Edit your application"
show:
+ edit: "Edit"
+ delete: "Delete"
+ confirm_delete: "Delete this application?"
client_id: "Client ID"
client_secret: "Client Secret"
client_secret_warning: "Make sure to save this secret - it will not be accessible again"
title: "My authorized applications"
application: "Application"
permissions: "Permissions"
+ no_applications_html: "You have not yet authorized any %{oauth2} applications."
application:
revoke: "Revoke Access"
confirm_revoke: "Revoke access for this application?"