This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Admin accounts page lists accounts
closed-social-glitch-2
Eugen Rochko
7 years ago
parent
816284d739
commit
ec44cff9a2
2 changed files
with
21 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
app/controllers/admin/accounts_controller.rb
+19
-0
app/views/admin/accounts/index.html.haml
+ 2
- 0
app/controllers/admin/accounts_controller.rb
View File
@ -6,8 +6,10 @@ class Admin::AccountsController < ApplicationController
layout
'public'
def
index
@accounts
=
Account
.
order
(
'domain ASC, username ASC'
)
.
paginate
(
page
:
params
[
:page
]
,
per_page
:
40
)
end
def
show
@account
=
Account
.
find
(
params
[
:id
]
)
end
end
+ 19
- 0
app/views/admin/accounts/index.html.haml
View File
@ -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
Write
Preview
Loading…
Cancel
Save