hoping groups properties

This commit is contained in:
tykayn 2019-08-27 17:33:45 +02:00
parent cd58e7c081
commit 48a0c6a2fc
3 changed files with 21 additions and 2 deletions

View File

@ -1,13 +1,18 @@
$no-columns-breakpoint: 600px; $no-columns-breakpoint: 600px;
table{ table{
thead{ thead{
th{ th{
font-weight: strong; font-weight: 800;
background: $ui-highlight-color;
} }
} }
td{ td, th{
padding: 1rem; padding: 1rem;
} }
a{
@extend .text-btn
}
} }
.table-responsive{ .table-responsive{
width: 100%; width: 100%;

View File

@ -11,6 +11,7 @@
%th Createat %th Createat
%th Visibility %th Visibility
%th Creator ID %th Creator ID
%th Statuses count
%th %th
%th %th
%th %th
@ -22,6 +23,7 @@
%td= user_group.created_at %td= user_group.created_at
%td= user_group.visibility %td= user_group.visibility
%td= user_group.account_id %td= user_group.account_id
%td= "0"
%td= link_to 'Show', user_group %td= link_to 'Show', user_group
%td= link_to 'Edit', edit_user_group_path(user_group) %td= link_to 'Edit', edit_user_group_path(user_group)
%td= link_to 'Destroy', user_group, :method => :delete, :data => { :confirm => 'Are you sure?' } %td= link_to 'Destroy', user_group, :method => :delete, :data => { :confirm => 'Are you sure?' }

View File

@ -6,7 +6,19 @@ class CreateUserGroups < ActiveRecord::Migration[5.2]
t.string :visibility t.string :visibility
t.integer :account_id t.integer :account_id
t.integer :creator_id t.integer :creator_id
t.integer :statuses_count
has_many :accounts, foreign_key: :domain, primary_key: :domain has_many :accounts, foreign_key: :domain, primary_key: :domain
has_many :note, foreign_key: :domain, primary_key: :domain
has_many :statuses, inverse_of: :account, dependent: :destroy
has_many :favourites, inverse_of: :account, dependent: :destroy
has_many :mentions, inverse_of: :account, dependent: :destroy
has_many :notifications, inverse_of: :account, dependent: :destroy
has_many :conversations, class_name: 'AccountConversation', dependent: :destroy, inverse_of: :account
has_many :scheduled_statuses, inverse_of: :account, dependent: :destroy
# Pinned statuses
has_many :status_pins, inverse_of: :account, dependent: :destroy
has_many :pinned_statuses, -> { reorder('status_pins.created_at DESC') }, through: :status_pins, class_name: 'Status', source: :status
t.timestamps t.timestamps
end end