Added/Updated admin dashboard tables

• Added:
- New Account filtering
- PreviewCard viewing/sorting/filtering deleting (todo)
- DeletePreviewCardWorker, Service
- Status viewing/sorting/filtering deleting
- ChatMessage viewing/sorting/filtering deleting (todo)
- Account > Follows view

• Updated:
- LinkBlock to sort alphabetically
- Groups to be under "Moderation" instead of "Admin" in navigation.rb
- Status in admin to have group name/link
- Reports reset button
- Group filtering/sorting
- LinkBlock filtering/sorting
- Account now has bio and few more data points in dashboard
This commit is contained in:
mgabdev
2021-01-19 01:25:25 -05:00
parent 24fa2d3a74
commit 51fa8f2eb4
39 changed files with 697 additions and 108 deletions

View File

@@ -4,8 +4,15 @@
= form_tag admin_groups_url, method: 'GET', class: 'simple_form' do
.fields-group
.input.string.optional
= text_field_tag :title, params[:title], class: 'string optional', placeholder: I18n.t("admin.groups.name")
= text_field_tag :id, params[:id], class: 'string optional', placeholder: "Id"
.input.string.optional
= text_field_tag :title, params[:title], class: 'string optional', placeholder: "Title"
.input.string.optional
= text_field_tag :description, params[:description], class: 'string optional', placeholder: "Description"
.input.string.optional
= text_field_tag :member_count_gte, params[:member_count_gte], class: 'string optional', placeholder: "Member Count >="
.input.string.optional
= text_field_tag :created_at_gte, params[:created_at_gte], class: 'string optional', placeholder: "Created >= (MM-DD-YYYY)"
.actions
%button= t('admin.accounts.search')
= link_to t('admin.accounts.reset'), admin_groups_path, class: 'button negative'

View File

@@ -15,7 +15,7 @@
.dashboard__counters{ style: 'margin-top: 10px' }
%div
%div
%a{href: "/admin/statuses?group_id=#{@group.id}"}
.dashboard__counters__num= number_with_delimiter Status.where(group:@group).count
.dashboard__counters__label Status Count
%div
@@ -30,6 +30,11 @@
%div
.dashboard__counters__num= number_with_delimiter @group.join_requests.count
.dashboard__counters__label Member Requests Count
%div
%div
.dashboard__counters__num
%time.formatted{ datetime: @group.created_at.iso8601, title: l(@group.created_at) }= l(@group.created_at)
.dashboard__counters__label Created
= simple_form_for(@group, url: admin_group_path(@group.id), html: { method: :put }) do |f|
= render 'shared/error_messages', object: @group