discourse/app/assets/javascripts/admin/addon/templates/users-list.hbs
Martin Brennan e26a1175d7
FEATURE: Initial version of experimental admin search (#31299)
This feature allows admins to find what they are
looking for in the admin interface via a search modal.
This replaces the admin sidebar filter
as the focus of the Ctrl+/ command, but the sidebar
filter can also still be used. Perhaps at some point
we may remove it or change the shortcut.

The search modal presents the following data for filtering:

* A list of all admin pages, the same as the sidebar,
   except also showing "third level" pages like
   "Email > Skipped"
* All site settings
* Themes
* Components
* Reports

Admins can also filter which types of items are shown in the modal,
for example hiding Settings if they know they are looking for a Page.

In this PR, I also have the following fixes:

* Site setting filters now clear when moving between
   filtered site setting pages, previously it was super
   sticky from Ember
* Many translations were moved around, instead of being
   in various namespaces for the sidebar links and the admin
   page titles and descriptions, now everything is under
   `admin.config` namespace, this makes it way easier to reuse
   this text for pages, search, and sidebar, and if you change it
   in one place then it is changed everywhere.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-02-21 11:59:24 +10:00

83 lines
No EOL
2.4 KiB
Handlebars
Vendored

<div class="admin-users admin-config-page">
<DPageHeader
@titleLabel={{i18n "admin.config.users.title"}}
@descriptionLabel={{i18n "admin.config.users.header_description"}}
@learnMoreUrl="https://meta.discourse.org/t/accessing-a-user-s-admin-page/311859"
>
<:breadcrumbs>
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
<DBreadcrumbsItem
@path="/admin/users/list"
@label={{i18n "admin.config.users.title"}}
/>
</:breadcrumbs>
<:actions as |actions|>
{{#if this.currentUser.can_invite_to_forum}}
<actions.Primary
@action={{route-action "sendInvites"}}
@title="admin.invite.button_title"
@label="admin.invite.button_text"
class="admin-users__header-send-invites"
/>
{{/if}}
{{#if this.currentUser.admin}}
<actions.Primary
@action={{route-action "exportUsers"}}
@title="admin.export_csv.button_title.user"
@label="admin.export_csv.button_text"
class="admin-users__header-export-users"
/>
{{/if}}
</:actions>
<:tabs>
<NavItem
@route="adminUsersList.show"
@routeParam="active"
@label="admin.users.nav.active"
class="admin-users-tabs__active"
/>
<NavItem
@route="adminUsersList.show"
@routeParam="new"
@label="admin.users.nav.new"
class="admin-users-tabs__new"
/>
<NavItem
@route="adminUsersList.show"
@routeParam="staff"
@label="admin.users.nav.staff"
class="admin-users-tabs__staff"
/>
<NavItem
@route="adminUsersList.show"
@routeParam="suspended"
@label="admin.users.nav.suspended"
class="admin-users-tabs__suspended"
/>
<NavItem
@route="adminUsersList.show"
@routeParam="silenced"
@label="admin.users.nav.silenced"
class="admin-users-tabs__silenced"
/>
<NavItem
@route="adminUsersList.show"
@routeParam="staged"
@label="admin.users.nav.staged"
class="admin-users-tabs__staged"
/>
<NavItem
@route="groups"
@label="groups.index.title"
class="admin-users-tabs__groups"
/>
</:tabs>
</DPageHeader>
<div class="admin-container admin-config-page__main-area">
</div>
</div>
<div class="admin-container admin-config-page__main-area">
{{outlet}}
</div>