Admin reports with accounts (#2092)
* Add a ReportFilter class * Add reports and targeted_reports relationships to Account * Use ReportFilter from admin/reports controller * Link to admin/reports filtered views from admin account show view * Add indexes to reports.account_id and reports.target_account_id
This commit is contained in:
parent
f23281e31e
commit
66d8f99a30
9 changed files with 92 additions and 5 deletions
|
@ -60,6 +60,12 @@
|
|||
= @account.media_attachments.count
|
||||
= surround '(', ')' do
|
||||
= number_to_human_size @account.media_attachments.sum('file_file_size')
|
||||
%tr
|
||||
%th= t('.created_reports')
|
||||
%td= link_to pluralize(@account.reports.count, t('.report')), admin_reports_path(account_id: @account.id)
|
||||
%tr
|
||||
%th= t('.targeted_reports')
|
||||
%td= link_to pluralize(@account.targeted_reports.count, t('.report')), admin_reports_path(target_account_id: @account.id)
|
||||
|
||||
- if @account.local?
|
||||
%div{ style: 'float: right' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue