]> git.openstreetmap.org Git - rails.git/blob - app/views/oauth2_applications/show.html.erb
Merge pull request #3642 from Firefishy/forum-to-community
[rails.git] / app / views / oauth2_applications / show.html.erb
1 <% content_for :heading do %>
2   <h1><%= @application.name %></h1>
3 <% end %>
4
5 <%= render :partial => "settings_menu" %>
6
7 <% secret = flash[:application_secret].presence || @application.plaintext_secret %>
8
9 <table class="table table-borderless">
10   <tr>
11     <th><%= t ".client_id" %></th>
12     <td><code><%= @application.uid %></code></td>
13   </tr>
14   <% unless secret.blank? && Doorkeeper.config.application_secret_hashed? -%>
15   <tr>
16     <th><%= t ".client_secret" %></th>
17     <td>
18       <code><%= secret %></code>
19       <% if Doorkeeper.config.application_secret_hashed? -%>
20       <br />
21       <small class="text-danger"><%= t ".client_secret_warning" %></small>
22       <% end -%>
23     </td>
24   </tr>
25   <% end -%>
26   <tr>
27     <th><%= t ".permissions" %></th>
28     <td>
29       <ul class="list-unstyled mb-0">
30         <% @application.scopes.each do |scope| -%>
31           <li><%= t "oauth.scopes.#{scope}" %> <code class="text-muted">(<%= scope %>)</code></li>
32         <% end -%>
33       </ul>
34     </td>
35   </tr>
36   <tr>
37     <th><%= t ".redirect_uris" %></th>
38     <td>
39       <ul class="list-unstyled mb-0">
40         <% @application.redirect_uri.split.each do |uri| -%>
41           <li><%= uri %></li>
42         <% end -%>
43       </ul>
44     </td>
45   </tr>
46 </table>
47
48 <div>
49   <%= link_to t(".edit"), edit_oauth_application_path(@application), :class => "btn btn-outline-primary" %>
50   <%= link_to t(".delete"), oauth_application_path(@application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_delete") } } %>
51 </div>