2020-12-16 00:31:30 +00:00
|
|
|
- content_for :page_title do
|
|
|
|
= @group.title
|
|
|
|
|
|
|
|
-# : todo :
|
|
|
|
-# add/remove admin
|
|
|
|
-# add/remove moderator
|
|
|
|
-# feature/unfeature
|
|
|
|
-# delete
|
|
|
|
-# view accounts
|
|
|
|
-# view removed accounts
|
|
|
|
|
|
|
|
.card.h-card{:style => "height:300px"}
|
2020-12-30 17:16:47 +00:00
|
|
|
.card__img{:style => "height:300px"}
|
2020-12-21 18:25:05 +00:00
|
|
|
= image_tag full_asset_url(@group.cover_image.url), alt: '', :style => "height:300px"
|
2020-12-16 00:31:30 +00:00
|
|
|
|
|
|
|
.dashboard__counters{ style: 'margin-top: 10px' }
|
|
|
|
%div
|
2021-01-19 06:25:25 +00:00
|
|
|
%a{href: "/admin/statuses?group_id=#{@group.id}"}
|
2020-12-21 18:25:05 +00:00
|
|
|
.dashboard__counters__num= number_with_delimiter Status.where(group:@group).count
|
2020-12-16 00:31:30 +00:00
|
|
|
.dashboard__counters__label Status Count
|
|
|
|
%div
|
|
|
|
%div
|
2020-12-21 18:25:05 +00:00
|
|
|
.dashboard__counters__num= number_with_delimiter @group.accounts.count
|
2020-12-16 00:31:30 +00:00
|
|
|
.dashboard__counters__label Member Count
|
|
|
|
%div
|
|
|
|
%div
|
2020-12-21 18:25:05 +00:00
|
|
|
.dashboard__counters__num= number_with_delimiter @group.removed_accounts.count
|
2020-12-16 00:31:30 +00:00
|
|
|
.dashboard__counters__label Removed Members Count
|
|
|
|
%div
|
|
|
|
%div
|
2020-12-21 18:25:05 +00:00
|
|
|
.dashboard__counters__num= number_with_delimiter @group.join_requests.count
|
|
|
|
.dashboard__counters__label Member Requests Count
|
2021-01-19 06:25:25 +00:00
|
|
|
%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
|
2020-12-21 18:25:05 +00:00
|
|
|
|
|
|
|
= simple_form_for(@group, url: admin_group_path(@group.id), html: { method: :put }) do |f|
|
|
|
|
= render 'shared/error_messages', object: @group
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :title, wrapper: :with_label, label: 'Title'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :description, wrapper: :with_label, label: 'Description'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :slug, wrapper: :with_label, label: 'Slug'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :tags, wrapper: :with_label, label: 'Tags'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :is_nsfw, as: :boolean, wrapper: :with_label, label: 'Is NSFW?'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :is_featured, as: :boolean, wrapper: :with_label, label: 'Is Featured?'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :is_private, as: :boolean, wrapper: :with_label, label: 'Is Private?'
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :is_visible, as: :boolean, wrapper: :with_label, label: 'Is Visible?'
|
|
|
|
|
2020-12-30 17:16:47 +00:00
|
|
|
.fields-group
|
|
|
|
= f.input :is_archived, as: :boolean, wrapper: :with_label, label: 'Is Archived?'
|
|
|
|
|
2020-12-21 18:25:05 +00:00
|
|
|
.actions
|
|
|
|
= f.button :button, t('generic.save_changes'), type: :submit
|
|
|
|
|
2020-12-30 17:16:47 +00:00
|
|
|
%br
|
|
|
|
%hr
|
|
|
|
%br
|
|
|
|
|
|
|
|
%span Group Admins and Moderators
|
|
|
|
%br
|
|
|
|
%br
|
|
|
|
|
|
|
|
.table-wrapper
|
|
|
|
%table.table
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= t('admin.accounts.username')
|
|
|
|
%th Role
|
|
|
|
%tbody
|
2020-12-31 21:41:34 +00:00
|
|
|
%tr
|
2021-02-18 21:49:14 +00:00
|
|
|
%td{style: "display:flex;flex-direction:row;align-items:center;"}
|
2020-12-31 21:41:34 +00:00
|
|
|
= admin_account_link_to(@group.account)
|
2021-02-18 21:49:14 +00:00
|
|
|
%div{style:"margin-left:10px;"}= render 'admin/accounts/account_flags_block', :account => @group.account
|
2020-12-31 21:41:34 +00:00
|
|
|
%td
|
|
|
|
%span Group Creator
|
2020-12-30 17:16:47 +00:00
|
|
|
- @admins.each do |acct|
|
|
|
|
%tr
|
2021-02-18 21:49:14 +00:00
|
|
|
%td{style: "display:flex;flex-direction:row;align-items:center;"}
|
2020-12-30 17:16:47 +00:00
|
|
|
= admin_account_link_to(acct.account)
|
2021-02-18 21:49:14 +00:00
|
|
|
%div{style:"margin-left:10px;"}= render 'admin/accounts/account_flags_block', :account => acct.account
|
2020-12-30 17:16:47 +00:00
|
|
|
%td
|
|
|
|
%span Admin
|
|
|
|
- @mods.each do |acct|
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= admin_account_link_to(acct.account)
|
|
|
|
%td
|
|
|
|
%span Moderator
|
|
|
|
|
|
|
|
|
|
|
|
%br
|
|
|
|
%hr
|
|
|
|
%br
|
|
|
|
|
|
|
|
.actions
|
|
|
|
= table_link_to 'arrow-up', 'Make me Admin', make_me_admin_admin_group_path(@group.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
|
|
|
|
|
|
|
|
%br
|
|
|
|
%hr
|
|
|
|
%br
|
|
|
|
|
|
|
|
.actions
|
|
|
|
= table_link_to 'times', 'Delete Group', admin_group_path(@group.id), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|