about summary refs log tree commit diff
path: root/app/views/doorkeeper
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/doorkeeper')
-rw-r--r--app/views/doorkeeper/applications/index.html.erb26
-rw-r--r--app/views/doorkeeper/applications/index.html.haml19
-rw-r--r--app/views/doorkeeper/authorized_applications/_delete_form.html.erb5
-rw-r--r--app/views/doorkeeper/authorized_applications/_delete_form.html.haml3
-rw-r--r--app/views/doorkeeper/authorized_applications/index.html.erb25
-rw-r--r--app/views/doorkeeper/authorized_applications/index.html.haml16
6 files changed, 38 insertions, 56 deletions
diff --git a/app/views/doorkeeper/applications/index.html.erb b/app/views/doorkeeper/applications/index.html.erb
deleted file mode 100644
index 4a3df8305..000000000
--- a/app/views/doorkeeper/applications/index.html.erb
+++ /dev/null
@@ -1,26 +0,0 @@
-<div class="page-header">
-  <h1><%= t('.title') %></h1>
-</div>
-
-<p><%= link_to t('.new'), new_oauth_application_path, class: 'btn btn-success' %></p>
-
-<table class="table table-striped">
-  <thead>
-  <tr>
-    <th><%= t('.name') %></th>
-    <th><%= t('.callback_url') %></th>
-    <th></th>
-    <th></th>
-  </tr>
-  </thead>
-  <tbody>
-  <% @applications.each do |application| %>
-    <tr id="application_<%= application.id %>">
-      <td><%= link_to application.name, oauth_application_path(application) %></td>
-      <td><%= application.redirect_uri %></td>
-      <td><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(application), class: 'btn btn-link' %></td>
-      <td><%= render 'delete_form', application: application %></td>
-    </tr>
-  <% end %>
-  </tbody>
-</table>
diff --git a/app/views/doorkeeper/applications/index.html.haml b/app/views/doorkeeper/applications/index.html.haml
new file mode 100644
index 000000000..908f664f2
--- /dev/null
+++ b/app/views/doorkeeper/applications/index.html.haml
@@ -0,0 +1,19 @@
+- content_for :page_title do
+  Applications
+
+%p= link_to t('.new'), new_oauth_application_path, class: 'btn btn-success'
+
+%table.table
+  %thead
+    %tr
+      %th= t('.name')
+      %th= t('.callback_url')
+      %th
+      %th
+  %tbody
+    - @applications.each do |application|
+      %tr
+        %td= link_to application.name, oauth_application_path(application)
+        %td= application.redirect_uri
+        %td= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(application), class: 'btn btn-link'
+        %td= render 'delete_form', application: application
diff --git a/app/views/doorkeeper/authorized_applications/_delete_form.html.erb b/app/views/doorkeeper/authorized_applications/_delete_form.html.erb
deleted file mode 100644
index 0b7e2dab3..000000000
--- a/app/views/doorkeeper/authorized_applications/_delete_form.html.erb
+++ /dev/null
@@ -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 %>
diff --git a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml
new file mode 100644
index 000000000..8400efcfe
--- /dev/null
+++ b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml
@@ -0,0 +1,3 @@
+= form_tag oauth_authorized_application_path(application) do
+  %input{type: "hidden", name: "_method", value: "delete"}
+  = submit_tag 'Revoke', class: 'btn'
diff --git a/app/views/doorkeeper/authorized_applications/index.html.erb b/app/views/doorkeeper/authorized_applications/index.html.erb
deleted file mode 100644
index aa8657c0f..000000000
--- a/app/views/doorkeeper/authorized_applications/index.html.erb
+++ /dev/null
@@ -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>
diff --git a/app/views/doorkeeper/authorized_applications/index.html.haml b/app/views/doorkeeper/authorized_applications/index.html.haml
new file mode 100644
index 000000000..f2f238e87
--- /dev/null
+++ b/app/views/doorkeeper/authorized_applications/index.html.haml
@@ -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