diff --git a/app/javascript/styles/bliss/forms.scss b/app/javascript/styles/bliss/forms.scss index cbf64a6bc..4b32b4058 100644 --- a/app/javascript/styles/bliss/forms.scss +++ b/app/javascript/styles/bliss/forms.scss @@ -1,13 +1,18 @@ $no-columns-breakpoint: 600px; table{ thead{ + th{ - font-weight: strong; + font-weight: 800; + background: $ui-highlight-color; } } - td{ + td, th{ padding: 1rem; } + a{ + @extend .text-btn + } } .table-responsive{ width: 100%; diff --git a/app/views/user_groups/index.html.haml b/app/views/user_groups/index.html.haml index fc44d1228..a228aec36 100644 --- a/app/views/user_groups/index.html.haml +++ b/app/views/user_groups/index.html.haml @@ -11,6 +11,7 @@ %th Createat %th Visibility %th Creator ID + %th Statuses count %th %th %th @@ -22,6 +23,7 @@ %td= user_group.created_at %td= user_group.visibility %td= user_group.account_id + %td= "0" %td= link_to 'Show', 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?' } diff --git a/db/migrate/20190827120456_create_user_groups.rb b/db/migrate/20190827120456_create_user_groups.rb index 9398cad28..f3274822e 100644 --- a/db/migrate/20190827120456_create_user_groups.rb +++ b/db/migrate/20190827120456_create_user_groups.rb @@ -6,7 +6,19 @@ class CreateUserGroups < ActiveRecord::Migration[5.2] t.string :visibility t.integer :account_id t.integer :creator_id + t.integer :statuses_count 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 end