about summary refs log tree commit diff
path: root/app/views/admin/subscriptions
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-05-31 14:39:35 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-31 20:39:35 +0200
commitde4681b2be0b0efa1dede092445a53d4a593c140 (patch)
tree2b481f7ceef23f467dafaa4eba7e35db0559a42e /app/views/admin/subscriptions
parenta132332b861f997540f30be1b90ade4648834b5b (diff)
Move admin/pubsubhubbub controller to admin/subscriptions (#3442)
Diffstat (limited to 'app/views/admin/subscriptions')
-rw-r--r--app/views/admin/subscriptions/_subscription.html.haml16
-rw-r--r--app/views/admin/subscriptions/index.html.haml15
2 files changed, 31 insertions, 0 deletions
diff --git a/app/views/admin/subscriptions/_subscription.html.haml b/app/views/admin/subscriptions/_subscription.html.haml
new file mode 100644
index 000000000..024788e13
--- /dev/null
+++ b/app/views/admin/subscriptions/_subscription.html.haml
@@ -0,0 +1,16 @@
+%tr
+  %td
+    %samp= subscription.account.acct
+  %td
+    %samp= subscription.callback_url
+  %td
+    - if subscription.confirmed?
+      %i.fa.fa-check
+  %td{ style: "color: #{subscription.expired? ? 'red' : 'inherit'};" }
+    = precede subscription.expired? ? '-' : '' do
+      = time_ago_in_words(subscription.expires_at)
+  %td
+    - if subscription.last_successful_delivery_at?
+      = l subscription.last_successful_delivery_at
+    - else
+      %i.fa.fa-times
diff --git a/app/views/admin/subscriptions/index.html.haml b/app/views/admin/subscriptions/index.html.haml
new file mode 100644
index 000000000..21b3238a6
--- /dev/null
+++ b/app/views/admin/subscriptions/index.html.haml
@@ -0,0 +1,15 @@
+- content_for :page_title do
+  = t('admin.subscriptions.title')
+
+%table.table
+  %thead
+    %tr
+      %th= t('admin.subscriptions.topic')
+      %th= t('admin.subscriptions.callback_url')
+      %th= t('admin.subscriptions.confirmed')
+      %th= t('admin.subscriptions.expires_in')
+      %th= t('admin.subscriptions.last_delivery')
+  %tbody
+    = render @subscriptions
+
+= paginate @subscriptions