Customized more doorkeeper views, only logged in users can create oauth apps

This commit is contained in:
Eugen Rochko
2016-03-12 19:46:06 +01:00
parent aab9f57e36
commit 1aa477ac2f
16 changed files with 234 additions and 102 deletions

View File

@ -1,5 +0,0 @@
<%- submit_btn_css ||= 'btn btn-link' %>
<%= form_tag oauth_authorized_application_path(application) do %>
<input type="hidden" name="_method" value="delete">
<%= submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css %>
<% end %>

View File

@ -0,0 +1,3 @@
= form_tag oauth_authorized_application_path(application) do
%input{type: "hidden", name: "_method", value: "delete"}
= submit_tag 'Revoke', class: 'btn'

View File

@ -1,25 +0,0 @@
<header class="page-header">
<h1><%= t('doorkeeper.authorized_applications.index.title') %></h1>
</header>
<main role="main">
<table class="table table-striped">
<thead>
<tr>
<th><%= t('doorkeeper.authorized_applications.index.application') %></th>
<th><%= t('doorkeeper.authorized_applications.index.created_at') %></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @applications.each do |application| %>
<tr>
<td><%= application.name %></td>
<td><%= application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) %></td>
<td><%= render 'delete_form', application: application %></td>
</tr>
<% end %>
</tbody>
</table>
</main>

View File

@ -0,0 +1,16 @@
- content_for :page_title do
Authorized apps
%p
You can register a new OAuth2 app
= link_to 'here', oauth_applications_path
%table.table
%thead
%tr
%th= t('doorkeeper.authorized_applications.index.application')
%th
- @applications.each do |application|
%tr
%td= application.name
%td= render 'delete_form', application: application