2024-06-19 08:42:05 -04:00
|
|
|
{{#if this.model.canLoadMore}}
|
|
|
|
{{hide-application-footer}}
|
|
|
|
{{/if}}
|
|
|
|
|
2024-03-28 06:12:48 -04:00
|
|
|
{{body-class "users-page"}}
|
|
|
|
<section>
|
2024-06-19 08:42:05 -04:00
|
|
|
<LoadMore
|
|
|
|
@selector=".user-card-directory .user-card-container"
|
|
|
|
@action={{action "loadMore"}}
|
|
|
|
>
|
2020-02-28 10:01:48 -05:00
|
|
|
<div class="container">
|
2020-06-24 04:27:45 -04:00
|
|
|
<div class="users-directory directory">
|
2023-07-13 18:47:03 -04:00
|
|
|
<PluginOutlet
|
|
|
|
@name="users-top"
|
|
|
|
@connectorTagName="div"
|
|
|
|
@outletArgs={{hash model=this.model}}
|
|
|
|
/>
|
2020-06-24 04:27:45 -04:00
|
|
|
<div class="directory-controls">
|
|
|
|
<div class="period-controls">
|
2024-06-19 08:42:05 -04:00
|
|
|
<PeriodChooser
|
|
|
|
@period={{this.period}}
|
|
|
|
@onChange={{fn (mut this.period)}}
|
|
|
|
@fullDay={{false}}
|
|
|
|
/>
|
|
|
|
{{#if this.lastUpdatedAt}}
|
2020-06-24 04:27:45 -04:00
|
|
|
<div class="directory-last-updated">
|
|
|
|
{{i18n "directory.last_updated"}}
|
2024-06-19 08:42:05 -04:00
|
|
|
{{this.lastUpdatedAt}}
|
2020-06-24 04:27:45 -04:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2021-12-01 13:43:11 -05:00
|
|
|
<div class="inline-form">
|
|
|
|
<label class="total-rows">
|
2024-06-19 08:42:05 -04:00
|
|
|
{{#if this.model.totalRows}}
|
|
|
|
{{i18n "directory.total_rows" count=this.model.totalRows}}
|
2021-07-01 12:50:38 -04:00
|
|
|
{{/if}}
|
2021-12-01 13:43:11 -05:00
|
|
|
</label>
|
2023-07-13 18:47:03 -04:00
|
|
|
<Input
|
2024-06-19 08:42:05 -04:00
|
|
|
@value={{readonly this.emailInput}}
|
2024-03-28 06:12:48 -04:00
|
|
|
placeholder={{i18n "directory.filter_name"}}
|
2021-07-01 12:50:38 -04:00
|
|
|
class="filter-name no-blur"
|
2024-06-19 08:42:05 -04:00
|
|
|
{{on "input" (with-event-value this.onUsernameFilterChanged)}}
|
2023-07-13 18:47:03 -04:00
|
|
|
/>
|
2024-06-19 08:42:05 -04:00
|
|
|
{{#if this.showGroupFilter}}
|
|
|
|
<ComboBox
|
|
|
|
@value={{this.group}}
|
|
|
|
@content={{this.groupOptions}}
|
|
|
|
@onChange={{this.groupChanged}}
|
|
|
|
@options={{hash none="directory.group.all"}}
|
2021-12-01 13:43:11 -05:00
|
|
|
class="directory-group-selector"
|
2024-06-19 08:42:05 -04:00
|
|
|
/>
|
2021-12-01 13:43:11 -05:00
|
|
|
{{/if}}
|
2024-06-19 08:42:05 -04:00
|
|
|
{{#if this.currentUser.staff}}
|
|
|
|
<DButton
|
|
|
|
@icon="wrench"
|
|
|
|
@action={{this.showEditColumnsModal}}
|
2021-07-01 12:50:38 -04:00
|
|
|
class="btn-default open-edit-columns-btn"
|
2024-06-19 08:42:05 -04:00
|
|
|
/>
|
2021-07-01 12:50:38 -04:00
|
|
|
{{/if}}
|
2023-07-13 18:47:03 -04:00
|
|
|
<PluginOutlet
|
|
|
|
@name="users-directory-controls"
|
|
|
|
@outletArgs={{hash model=this.model}}
|
|
|
|
/>
|
2020-06-24 04:27:45 -04:00
|
|
|
</div>
|
2020-02-28 10:01:48 -05:00
|
|
|
</div>
|
|
|
|
|
2024-06-19 08:42:05 -04:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.isLoading}}>
|
|
|
|
{{#if this.userCards.length}}
|
2022-06-18 10:52:34 -04:00
|
|
|
<div class="user-card-directory">
|
2024-06-19 08:42:05 -04:00
|
|
|
{{#each this.userCards as |userCard|}}
|
2022-06-18 10:52:34 -04:00
|
|
|
<div class="user-card-container">
|
2024-06-19 08:42:05 -04:00
|
|
|
<UserCardStatic
|
|
|
|
@user={{userCard.user}}
|
|
|
|
@visible={{true}}
|
|
|
|
@loading={{userCard.loading}}
|
|
|
|
@username={{userCard.user.username}}
|
|
|
|
@showUser={{this.userCardShowUser}}
|
|
|
|
/>
|
2022-06-18 10:52:34 -04:00
|
|
|
{{#if (theme-setting "show_stats")}}
|
|
|
|
<div class="user-card-directory-footer">
|
2024-06-19 08:42:05 -04:00
|
|
|
{{#each this.columns as |column|}}
|
2023-07-13 18:47:03 -04:00
|
|
|
<span
|
|
|
|
class="stat stat-{{dasherize column.name}}
|
|
|
|
stat-type-{{column.type}}"
|
|
|
|
>
|
2022-06-18 10:52:34 -04:00
|
|
|
<span class="value">
|
|
|
|
{{#if
|
|
|
|
(directory-column-is-user-field column=column)
|
|
|
|
}}
|
|
|
|
{{directory-item-user-field-value
|
|
|
|
item=userCard.directoryItem
|
|
|
|
column=column
|
|
|
|
}}
|
|
|
|
{{else}}
|
|
|
|
{{directory-item-value
|
|
|
|
item=userCard.directoryItem
|
|
|
|
column=column
|
|
|
|
}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
<span class="label">
|
2024-06-19 08:42:05 -04:00
|
|
|
<TableHeaderToggle
|
2024-10-16 12:15:53 -04:00
|
|
|
@onToggle={{this.updateOrder}}
|
2024-06-19 08:42:05 -04:00
|
|
|
@field={{column.name}}
|
|
|
|
@icon={{column.icon}}
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{directory-column-is-automatic
|
2022-06-18 10:52:34 -04:00
|
|
|
column=column
|
2024-06-19 08:42:05 -04:00
|
|
|
}}
|
|
|
|
@translated={{column.user_field_id}}
|
|
|
|
@onActiveRender={{this.setActiveHeader}}
|
|
|
|
/>
|
2022-06-18 10:52:34 -04:00
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2020-03-09 12:37:29 -04:00
|
|
|
</div>
|
2022-06-18 10:52:34 -04:00
|
|
|
{{/each}}
|
2020-02-28 10:01:48 -05:00
|
|
|
</div>
|
2024-06-19 08:42:05 -04:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
|
2020-02-28 10:01:48 -05:00
|
|
|
{{else}}
|
2024-06-19 08:42:05 -04:00
|
|
|
<div class="empty-state">
|
|
|
|
<div class="empty-state-body">
|
|
|
|
<p>
|
|
|
|
{{#if this.name}}
|
|
|
|
{{i18n "directory.no_results_with_search"}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n "directory.no_results.body"}}
|
|
|
|
{{#if this.currentUser.staff}}
|
|
|
|
{{html-safe
|
|
|
|
(i18n
|
|
|
|
"directory.no_results.extra_body" basePath=(base-path)
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-28 10:01:48 -05:00
|
|
|
{{/if}}
|
2024-06-19 08:42:05 -04:00
|
|
|
</ConditionalLoadingSpinner>
|
2020-02-28 10:01:48 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-06-19 08:42:05 -04:00
|
|
|
</LoadMore>
|
2024-03-28 06:12:48 -04:00
|
|
|
</section>
|