2020-02-28 10:01:48 -05:00
|
|
|
{{#d-section pageClass="users"}}
|
2022-06-18 10:52:34 -04:00
|
|
|
{{#load-more
|
|
|
|
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">
|
2022-06-18 10:52:34 -04:00
|
|
|
{{period-chooser
|
|
|
|
period=period
|
|
|
|
onChange=(action (mut period))
|
|
|
|
fullDay=false
|
|
|
|
}}
|
2020-06-24 04:27:45 -04:00
|
|
|
{{#if lastUpdatedAt}}
|
|
|
|
<div class="directory-last-updated">
|
|
|
|
{{i18n "directory.last_updated"}}
|
|
|
|
{{lastUpdatedAt}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2021-12-01 13:43:11 -05:00
|
|
|
<div class="inline-form">
|
|
|
|
<label class="total-rows">
|
2021-07-01 12:50:38 -04:00
|
|
|
{{#if model.totalRows}}
|
|
|
|
{{i18n "directory.total_rows" count=model.totalRows}}
|
|
|
|
{{/if}}
|
2021-12-01 13:43:11 -05:00
|
|
|
</label>
|
2023-07-13 18:47:03 -04:00
|
|
|
<Input
|
|
|
|
@value={{readonly emailInput}}
|
|
|
|
placeholder={{I18n "directory.filter_name"}}
|
2021-07-01 12:50:38 -04:00
|
|
|
class="filter-name no-blur"
|
2023-07-13 18:47:03 -04:00
|
|
|
{{on
|
|
|
|
"input"
|
|
|
|
(action "onUsernameFilterChanged" value="target.value")
|
|
|
|
}}
|
|
|
|
/>
|
2021-12-01 13:43:11 -05:00
|
|
|
{{#if showGroupFilter}}
|
|
|
|
{{combo-box
|
|
|
|
class="directory-group-selector"
|
|
|
|
value=group
|
|
|
|
content=groupOptions
|
|
|
|
onChange=(action groupChanged)
|
2022-06-18 10:52:34 -04:00
|
|
|
options=(hash none="directory.group.all")
|
2021-12-01 13:43:11 -05:00
|
|
|
}}
|
|
|
|
{{/if}}
|
2021-07-01 12:50:38 -04:00
|
|
|
{{#if currentUser.staff}}
|
|
|
|
{{d-button
|
|
|
|
icon="wrench"
|
|
|
|
action=(action "showEditColumnsModal")
|
|
|
|
class="btn-default open-edit-columns-btn"
|
|
|
|
}}
|
|
|
|
{{/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>
|
|
|
|
|
2021-07-01 12:50:38 -04:00
|
|
|
{{#conditional-loading-spinner condition=isLoading}}
|
2020-02-28 10:01:48 -05:00
|
|
|
{{#if userCards.length}}
|
2022-06-18 10:52:34 -04:00
|
|
|
<div class="user-card-directory">
|
|
|
|
{{#each userCards as |userCard|}}
|
|
|
|
<div class="user-card-container">
|
|
|
|
{{user-card-static
|
|
|
|
user=userCard.user
|
|
|
|
visible=true
|
|
|
|
loading=userCard.loading
|
|
|
|
username=userCard.user.username
|
2022-10-17 05:06:20 -04:00
|
|
|
showUser=this.userCardShowUser
|
2020-02-28 10:01:48 -05:00
|
|
|
}}
|
2022-06-18 10:52:34 -04:00
|
|
|
{{#if (theme-setting "show_stats")}}
|
|
|
|
<div class="user-card-directory-footer">
|
|
|
|
{{#each 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">
|
|
|
|
{{table-header-toggle
|
|
|
|
field=column.name
|
|
|
|
icon=column.icon
|
|
|
|
order=order
|
|
|
|
asc=asc
|
|
|
|
automatic=(directory-column-is-automatic
|
|
|
|
column=column
|
|
|
|
)
|
|
|
|
translated=column.user_field_id
|
|
|
|
onActiveRender=setActiveHeader
|
|
|
|
}}
|
|
|
|
</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>
|
|
|
|
{{conditional-loading-spinner condition=model.loadingMore}}
|
|
|
|
{{else}}
|
2021-07-01 12:50:38 -04:00
|
|
|
<div class="clearfix"></div>
|
2020-02-28 10:01:48 -05:00
|
|
|
<p>{{i18n "directory.no_results"}}</p>
|
|
|
|
{{/if}}
|
|
|
|
{{/conditional-loading-spinner}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/load-more}}
|
2023-01-04 07:48:00 -05:00
|
|
|
{{/d-section}}
|