Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gab-social
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
gab
social
gab-social
Commits
89a16b10
Commit
89a16b10
authored
Jan 13, 2021
by
mgabdev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated admin dashboard for ChatConversationAccounts
• Updated: - admin dashboard for ChatConversationAccounts
parent
183e46aa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
32 deletions
+40
-32
app/controllers/admin/chat_conversation_accounts_controller.rb
...ontrollers/admin/chat_conversation_accounts_controller.rb
+2
-2
app/views/admin/accounts/show.html.haml
app/views/admin/accounts/show.html.haml
+1
-1
app/views/admin/chat_conversation_accounts/_chat_conversation_account.html.haml
...onversation_accounts/_chat_conversation_account.html.haml
+12
-0
app/views/admin/chat_conversation_accounts/index.html.haml
app/views/admin/chat_conversation_accounts/index.html.haml
+24
-0
app/views/admin/chat_conversations/index.html.haml
app/views/admin/chat_conversations/index.html.haml
+0
-28
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/controllers/admin/chat_conversations_controller.rb
→
app/controllers/admin/chat_conversation
_account
s_controller.rb
View file @
89a16b10
# frozen_string_literal: true
module
Admin
class
ChatConversationsController
<
BaseController
class
ChatConversation
Account
sController
<
BaseController
before_action
:set_account
PER_PAGE
=
20
def
index
authorize
:account
,
:index?
@chat
ConversationA
ccounts
=
ChatConversationAccount
.
where
(
account:
@account
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
@chat
_conversation_a
ccounts
=
ChatConversationAccount
.
where
(
account:
@account
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
end
def
set_account
...
...
app/views/admin/accounts/show.html.haml
View file @
89a16b10
...
...
@@ -47,7 +47,7 @@
.dashboard__counters__num
=
number_with_delimiter
@account
.
groups
.
count
.dashboard__counters__label
Joined Groups
%div
=
link_to
admin_account_chat_conversations_path
(
@account
.
id
)
do
=
link_to
admin_account_chat_conversation
_account
s_path
(
@account
.
id
)
do
.dashboard__counters__num
=
number_with_delimiter
@account
.
chat_conversation_accounts_count
.dashboard__counters__label
Chat Conversations
%div
...
...
app/views/admin/chat_conversation_accounts/_chat_conversation_account.html.haml
0 → 100644
View file @
89a16b10
%tr
%td
=
admin_account_link_to
(
chat_conversation_account
.
account
)
%td
-
chat_conversation_account
.
participant_account_ids
.
each
do
|
a
|
%a
{
href:
"/admin/accounts/#{a}"
}=
a
%td
%span
=
chat_conversation_account
.
is_approved
?
"Y"
:
"N"
%td
%span
=
chat_conversation_account
.
is_hidden
?
"Y"
:
"N"
%td
%span
=
chat_conversation_account
.
is_muted
?
"Y"
:
"N"
\ No newline at end of file
app/views/admin/chat_conversation_accounts/index.html.haml
0 → 100644
View file @
89a16b10
-
content_for
:page_title
do
%span
=
"Chat conversations including: @
#{
@account
.
acct
}
"
.filters
.back-link
{
style:
'flex: 1 1 auto; text-align: left'
}
=
link_to
admin_account_path
(
@account
.
id
)
do
=
fa_icon
'chevron-left fw'
=
t
(
'admin.followers.back_to_account'
)
%hr
.spacer
/
.table-wrapper
%table
.table
%thead
%tr
%th
Account
%th
Members
%th
Approved?
%th
Hidden?
%th
Muted?
%tbody
=
render
@chat_conversation_accounts
=
paginate
@chat_conversation_accounts
app/views/admin/chat_conversations/index.html.haml
deleted
100644 → 0
View file @
183e46aa
-
content_for
:page_title
do
=
t
(
'admin.followers.title'
,
acct:
@account
.
acct
)
.filters
.filter-subset
%strong
=
t
(
'admin.accounts.location.title'
)
%ul
%li
=
link_to
t
(
'admin.accounts.location.local'
),
admin_account_followers_path
(
@account
.
id
),
class:
'selected'
.back-link
{
style:
'flex: 1 1 auto; text-align: right'
}
=
link_to
admin_account_path
(
@account
.
id
)
do
=
fa_icon
'chevron-left fw'
=
t
(
'admin.followers.back_to_account'
)
%hr
.spacer
/
.table-wrapper
%table
.table
%thead
%tr
%th
=
t
(
'admin.accounts.username'
)
%th
=
t
(
'admin.accounts.role'
)
%th
=
t
(
'admin.accounts.most_recent_ip'
)
%th
=
t
(
'admin.accounts.most_recent_activity'
)
%th
%tbody
=
render
partial:
'admin/accounts/account'
,
collection:
@followers
=
paginate
@followers
config/routes.rb
View file @
89a16b10
...
...
@@ -142,7 +142,7 @@ Rails.application.routes.draw do
resources
:statuses
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
]
resources
:followers
,
only:
[
:index
]
resources
:joined_groups
,
only:
[
:index
]
resources
:chat_conversations
,
only:
[
:index
]
resources
:chat_conversation
_account
s
,
only:
[
:index
]
resources
:chat_messages
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
]
resource
:confirmation
,
only:
[
:create
]
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment