Admin accounts page lists accounts
This commit is contained in:
parent
816284d739
commit
ec44cff9a2
|
@ -6,8 +6,10 @@ class Admin::AccountsController < ApplicationController
|
||||||
layout 'public'
|
layout 'public'
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@accounts = Account.order('domain ASC, username ASC').paginate(page: params[:page], per_page: 40)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@account = Account.find(params[:id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
%table.table
|
||||||
|
%thead
|
||||||
|
%tr
|
||||||
|
%th Username
|
||||||
|
%th Domain
|
||||||
|
%th Subscribed
|
||||||
|
%tbody
|
||||||
|
- @accounts.each do |account|
|
||||||
|
%tr
|
||||||
|
%td= account.username
|
||||||
|
%td= account.domain
|
||||||
|
%th
|
||||||
|
- if account.local?
|
||||||
|
Local
|
||||||
|
- elsif account.subscribed?
|
||||||
|
%i.fa.fa-check
|
||||||
|
- else
|
||||||
|
%i.fa.fa-times
|
||||||
|
= will_paginate @accounts, pagination_options
|
Loading…
Reference in a new issue