openstreetmap-website/app/views/oauth2_applications/show.html.erb
Harry Wood 2ce44a2a85 Fix minor HTML tag mismatches
Fix some HTML tag mismatches and other glitches. These are minor, and don't appear to cause browsers any problems, but for the sake of correctness:
* A closing td which should be a closing div.
* A closing h3 for a corresponding h6
* Two tables with `<thead>` tag and missing `<tr>` around the `<th>` headings.

test change for thead fix
2022-03-05 02:44:59 +00:00

51 lines
1.5 KiB
Text

<% content_for :heading do %>
<h1><%= @application.name %></h1>
<% end %>
<%= render :partial => "settings_menu" %>
<% secret = flash[:application_secret].presence || @application.plaintext_secret %>
<table class="table table-borderless">
<tr>
<th><%= t ".client_id" %></th>
<td><code><%= @application.uid %></code></td>
</tr>
<% unless secret.blank? && Doorkeeper.config.application_secret_hashed? -%>
<tr>
<th><%= t ".client_secret" %></th>
<td>
<code><%= secret %></code>
<% if Doorkeeper.config.application_secret_hashed? -%>
<br />
<small class="text-danger"><%= t ".client_secret_warning" %></small>
<% end -%>
</td>
</tr>
<% end -%>
<tr>
<th><%= t ".permissions" %></th>
<td>
<ul class="list-unstyled mb-0">
<% @application.scopes.each do |scope| -%>
<li><%= t "oauth.scopes.#{scope}" %> <code class="text-muted">(<%= scope %>)</code></li>
<% end -%>
</ul>
</td>
</tr>
<tr>
<th><%= t ".redirect_uris" %></th>
<td>
<ul class="list-unstyled mb-0">
<% @application.redirect_uri.split.each do |uri| -%>
<li><%= uri %></li>
<% end -%>
</ul>
</td>
</tr>
</table>
<div>
<%= link_to t(".edit"), edit_oauth_application_path(@application), :class => "btn btn-outline-primary" %>
<%= link_to t(".delete"), oauth_application_path(@application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_delete") } } %>
</div>