Commit ba4bf27f authored by Douwe Maan's avatar Douwe Maan

Use table-holder where appropriate

parent 9ea72430
...@@ -15,24 +15,25 @@ ...@@ -15,24 +15,25 @@
.pull-right .pull-right
= link_to 'New Application', new_oauth_application_path, class: 'btn btn-success' = link_to 'New Application', new_oauth_application_path, class: 'btn btn-success'
- if @applications.any? - if @applications.any?
%table.table.table-striped .table-holder
%thead %table.table.table-striped
%tr %thead
%th Name %tr
%th Callback URL %th Name
%th Clients %th Callback URL
%th %th Clients
%th %th
%tbody %th
- @applications.each do |application| %tbody
%tr{:id => "application_#{application.id}"} - @applications.each do |application|
%td= link_to application.name, oauth_application_path(application) %tr{:id => "application_#{application.id}"}
%td %td= link_to application.name, oauth_application_path(application)
- application.redirect_uri.split.each do |uri| %td
%div= uri - application.redirect_uri.split.each do |uri|
%td= application.access_tokens.count %div= uri
%td= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm' %td= application.access_tokens.count
%td= render 'doorkeeper/applications/delete_form', application: application %td= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm'
%td= render 'doorkeeper/applications/delete_form', application: application
.oauth-authorized-applications.prepend-top-20 .oauth-authorized-applications.prepend-top-20
- if user_oauth_applications? - if user_oauth_applications?
...@@ -40,29 +41,30 @@ ...@@ -40,29 +41,30 @@
Authorized applications Authorized applications
- if @authorized_tokens.any? - if @authorized_tokens.any?
%table.table.table-striped .table-holder
%thead %table.table.table-striped
%tr %thead
%th Name
%th Authorized At
%th Scope
%th
%tbody
- @authorized_apps.each do |app|
- token = app.authorized_tokens.order('created_at desc').first
%tr{:id => "application_#{app.id}"}
%td= app.name
%td= token.created_at
%td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', application: app
- @authorized_anonymous_tokens.each do |token|
%tr %tr
%td %th Name
Anonymous %th Authorized At
%div.help-block %th Scope
%em Authorization was granted by entering your username and password in the application. %th
%td= token.created_at %tbody
%td= token.scopes - @authorized_apps.each do |app|
%td= render 'doorkeeper/authorized_applications/delete_form', token: token - token = app.authorized_tokens.order('created_at desc').first
%tr{:id => "application_#{app.id}"}
%td= app.name
%td= token.created_at
%td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', application: app
- @authorized_anonymous_tokens.each do |token|
%tr
%td
Anonymous
%div.help-block
%em Authorization was granted by entering your username and password in the application.
%td= token.created_at
%td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', token: token
- else - else
%p.light You don't have any authorized applications %p.light You don't have any authorized applications
- is_admin = defined?(admin) ? true : false - is_admin = defined?(admin) ? true : false
.panel.panel-default - if @keys.any?
- if @keys.any? .table-holder
%table.table %table.table
%thead.panel-heading %thead.panel-heading
%tr %tr
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
%tbody %tbody
- @keys.each do |key| - @keys.each do |key|
= render 'profiles/keys/key', key: key, is_admin: is_admin = render 'profiles/keys/key', key: key, is_admin: is_admin
- else - else
.nothing-here-block .nothing-here-block
- if is_admin - if is_admin
User has no ssh keys User has no ssh keys
- else - else
There are no SSH keys with access to your account. There are no SSH keys with access to your account.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment