2017-01-15 11:33:37 -08:00
< template name = "UserManagement" >
< div id = "userManagement" >
{{#if Template.subscriptionsReady}}
2017-10-20 14:54:58 -07:00
< div class = "tableControls" >
< div class = "contentControls" >
< a class = "loadMoreLink {{#if disableLoadMore}}disabled{{/if}}" href = "javascript:" > Load More...< / a >
< / div >
2017-01-15 11:33:37 -08:00
< / div >
2017-10-20 14:54:58 -07:00
< div class = "separatedTableHeader" >
< table class = "table table-striped table-hover" >
2017-01-15 11:33:37 -08:00
< thead >
2017-10-20 14:54:58 -07:00
< tr >
< th class = "username" > Username {{>UserSearch columnName='username'}}< / th >
< th class = "email" > Email {{>UserSearch columnName='email' collectionQueryColumnName='name' collection='Items' collectionResultColumnName='_id'}}< / th >
2017-01-17 22:31:43 -08:00
< th class = "roles" > Roles< / th >
2017-10-20 14:54:58 -07:00
< th class = "actions" > Actions < span class = "newUserButton btn btn-success" > < i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > < i class = "fa fa-times-circle" aria-hidden = "true" > < / i > < / span > < / th >
2017-01-15 11:33:37 -08:00
< / tr >
< / thead >
< / table >
< / div >
2017-10-20 14:54:58 -07:00
< div class = "listRow" >
< div class = "listCell" >
< div class = "tableContainer mCustomScrollbar" data-mcs-theme = "dark" >
< table class = "dataTable table table-striped table-hover" >
< tbody >
{{#if displayNewUser}}
< tr > {{> UserEditor isNew=true}}< / tr >
{{/if}}
{{#each users}}
{{> User}}
{{/each}}
< / tbody >
< / table >
< / div >
< / div >
< / div >
2017-01-15 11:33:37 -08:00
{{else}}
{{/if}}
< / div >
< / template >
< template name = "User" >
< tr >
{{#if editing}}
2017-10-20 14:54:58 -07:00
{{> UserEditor}}
2017-01-15 11:33:37 -08:00
{{else}}
2017-10-20 14:54:58 -07:00
< td class = "username tdLarge noselect nonclickable" > {{username}}< / td >
< td class = "email tdLarge noselect nonclickable" > {{email}}< / td >
< td class = "roles tdLarge noselect nonclickable" > {{roles}}< / td >
< td class = "actions center tdLarge" > < i class = "userRemove fa fa-times-circle fa-lg noselect clickable" aria-hidden = "true" > < / i > / < i class = "userEdit fa fa-pencil-square-o fa-lg noselect clickable" aria-hidden = "true" > < / i > < / td >
2017-01-15 11:33:37 -08:00
{{/if}}
< / tr >
< / template >
2017-10-20 14:54:58 -07:00
< template name = "UserEditor" >
< td colspan = "3" class = "userEditor measureEditorTd" >
< div >
< div class = "username editorDiv" > < label > User Name:< / label > < input name = "username" class = "form-control" type = "text" value = "{{username}}" autocomplete = "off" required > < / div >
< div class = "email editorDiv" > < label > User Email:< / label > < input name = "email" class = "form-control" type = "text" value = "{{email}}" autocomplete = "off" required > < / div >
< div class = "rolesContainer editorDiv" > < label > Roles:< / label >
< div class = "roles center" style = "font-size: 1.2em" >
{{#each allRoles}}
2025-07-02 11:18:09 -07:00
<!-- Roles no longer have a name, they now put the name as the _id in Mongo -->
< span class = "role {{getRoleState this}} noselect" > {{_id}}< / span >
2017-10-20 14:54:58 -07:00
{{/each}}
< / div >
< / div >
< / div >
< / td >
< td class = "actions center measureEditorTd" > < i class = "editorApply fa fa-check-square-o fa-lg noselect clickable" aria-hidden = "true" > < / i > / < i class = "editorCancel fa fa-times-circle fa-lg noselect clickable" aria-hidden = "true" > < / i > < / td >
< / template >
2017-01-15 11:33:37 -08:00
< template name = "UserSearch" >
< div class = "" >
2017-01-17 22:31:43 -08:00
< input type = "text" class = "searchInput" placeholder = "Filter..." value = "{{searchValue}}" style = "width: 90%" / >
2017-01-15 11:33:37 -08:00
< / div >
< / template >