BigW Consortium Gitlab

applications.html.haml 1.6 KB
Newer Older
1
- page_title "Applications"
2
%h3.page-title
3
  = page_title
4 5
%p.light
  OAuth2 protocol settings below.
6
%hr
7

8 9 10 11 12
.oauth-applications
  %h3
    Your applications
    .pull-right
      = link_to 'New Application', new_oauth_application_path, class: 'btn btn-success'
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  - if @applications.any?
    %table.table.table-striped
      %thead
        %tr
          %th Name
          %th Callback URL
          %th Clients
          %th
          %th
      %tbody
        - @applications.each do |application|
          %tr{:id => "application_#{application.id}"}
            %td= link_to application.name, oauth_application_path(application)
            %td
              - application.redirect_uri.split.each do |uri|
                %div= uri
            %td= application.access_tokens.count
Dmitriy Zaporozhets committed
30
            %td= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm'
31 32
            %td= render 'doorkeeper/applications/delete_form', application: application

33 34 35
.oauth-authorized-applications.prepend-top-20
  %h3
    Authorized applications
36 37 38 39 40 41 42 43 44 45

  - if @authorized_tokens.any?
    %table.table.table-striped
      %thead
        %tr
          %th Name
          %th Authorized At
          %th Scope
          %th
      %tbody
46 47 48 49
        - @authorized_apps.each do |app|
          - token = app.authorized_tokens.order('created_at desc').first
          %tr{:id => "application_#{app.id}"}
            %td= app.name
50 51
            %td= token.created_at
            %td= token.scopes
52
            %td= render 'doorkeeper/authorized_applications/delete_form', application: app
53 54
  - else
    %p.light You dont have any authorized applications