logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: ec44cff9a2e7e5a522f2c0685745f1ab6d58436f
parent: 816284d73924ceb453c76d571bcb315be91b2b08
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sat,  3 Dec 2016 19:08:07 +0100

Admin accounts page lists accounts

Diffstat:

Mapp/controllers/admin/accounts_controller.rb2++
Mapp/views/admin/accounts/index.html.haml19+++++++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb @@ -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 diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml @@ -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