Move admin/pubsubhubbub controller to admin/subscriptions (#3442)
This commit is contained in:
committed by
Eugen Rochko
parent
a132332b86
commit
de4681b2be
@ -1,9 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class PubsubhubbubController < BaseController
|
||||
def index
|
||||
@subscriptions = Subscription.order(id: :desc).includes(:account).page(params[:page])
|
||||
end
|
||||
end
|
||||
end
|
19
app/controllers/admin/subscriptions_controller.rb
Normal file
19
app/controllers/admin/subscriptions_controller.rb
Normal file
@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class SubscriptionsController < BaseController
|
||||
def index
|
||||
@subscriptions = ordered_subscriptions.page(requested_page)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ordered_subscriptions
|
||||
Subscription.order(id: :desc).includes(:account)
|
||||
end
|
||||
|
||||
def requested_page
|
||||
params[:page].to_i
|
||||
end
|
||||
end
|
||||
end
|
@ -1,15 +0,0 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.pubsubhubbub.title')
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.pubsubhubbub.topic')
|
||||
%th= t('admin.pubsubhubbub.callback_url')
|
||||
%th= t('admin.pubsubhubbub.confirmed')
|
||||
%th= t('admin.pubsubhubbub.expires_in')
|
||||
%th= t('admin.pubsubhubbub.last_delivery')
|
||||
%tbody
|
||||
= render partial: 'subscription', collection: @subscriptions
|
||||
|
||||
= paginate @subscriptions
|
15
app/views/admin/subscriptions/index.html.haml
Normal file
15
app/views/admin/subscriptions/index.html.haml
Normal file
@ -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
|
Reference in New Issue
Block a user