Skip to content

Commit

Permalink
feat: add display name column to admin users list
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Feb 21, 2023
1 parent 0da069b commit 54119f8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
9 changes: 9 additions & 0 deletions framework/core/js/src/admin/components/UserListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ export default class UserListPage extends AdminPage {
90
);

columns.add(
'displayName',
{
name: app.translator.trans('core.admin.users.grid.columns.display_name.title'),
content: (user: User) => user.displayName(),
},
85
);

columns.add(
'joinDate',
{
Expand Down
27 changes: 13 additions & 14 deletions framework/core/locale/core.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
core:

##
# UNIQUE KEYS - The following keys are used in only one location each.
##

# Translations in this namespace are used by the admin interface.
admin:

# These translations are used in the Appearance page.
appearance:
colored_header_label: Colored Header
Expand Down Expand Up @@ -245,6 +243,9 @@ core:

grid:
columns:
display_name:
title: Display name

edit_user:
button: => core.ref.edit
title: => core.ref.edit_user
Expand Down Expand Up @@ -282,7 +283,6 @@ core:

# Translations in this namespace are used by the forum user interface.
forum:

# These translations are used in the Change Email modal dialog.
change_email:
confirm_password_placeholder: => core.ref.confirm_password
Expand Down Expand Up @@ -665,7 +665,6 @@ core:

# Translations in this namespace are used in emails sent by the forum.
email:

# These translations are used in emails sent when users register new accounts.
activate_account:
subject: Activate Your New Account
Expand Down Expand Up @@ -726,7 +725,7 @@ core:
all_discussions: All Discussions
change_email: Change Email
change_password: Change Password
color: Color # Referenced by flarum-tags.yml
color: Color # Referenced by flarum-tags.yml
confirm_password: Confirm Password
confirm_email: Confirm Email
confirmation_email_sent: "We've sent a confirmation email to {email}. If it doesn't arrive soon, check your spam folder."
Expand All @@ -736,7 +735,7 @@ core:
custom_header_title: Edit Custom Header
delete: Delete
delete_forever: Delete Forever
discussions: Discussions # Referenced by flarum-statistics.yml
discussions: Discussions # Referenced by flarum-statistics.yml
edit: Edit
edit_user: Edit User
email: Email
Expand All @@ -750,26 +749,26 @@ core:
mark_all_as_read: Mark All as Read
next_page: Next Page
notifications: Notifications
okay: OK # Referenced by flarum-tags.yml
okay: OK # Referenced by flarum-tags.yml
password: Password
posts: Posts # Referenced by flarum-statistics.yml
posts: Posts # Referenced by flarum-statistics.yml
previous_page: Previous Page
remove: Remove
rename: Rename
reply: Reply # Referenced by flarum-mentions.yml
reply: Reply # Referenced by flarum-mentions.yml
reset_your_password: Reset Your Password
restore: Restore
save_changes: Save Changes
search_users: Search users # Referenced by flarum-suspend.yml, flarum-tags.yml
save_changes: Save Changes
search_users: Search users # Referenced by flarum-suspend.yml, flarum-tags.yml
settings: Settings
sign_up: Sign Up
some_others: "{count, plural, one {# other} other {# others}}" # Referenced by flarum-likes.yml, flarum-mentions.yml
some_others: "{count, plural, one {# other} other {# others}}" # Referenced by flarum-likes.yml, flarum-mentions.yml
start_a_discussion: Start a Discussion
username: Username
users: Users # Referenced by flarum-statistics.yml
users: Users # Referenced by flarum-statistics.yml
view: View
write_a_reply: Write a Reply...
you: You # Referenced by flarum-likes.yml, flarum-mentions.yml
you: You # Referenced by flarum-likes.yml, flarum-mentions.yml

##
# GROUP NAMES - These keys are translated at the back end.
Expand Down

0 comments on commit 54119f8

Please sign in to comment.