2019-05-09 18:54:39 +12:00
<?php
$providers = $this->getParam('providers', []);
?>
< div class = "cover" >
< h1 class = "zone xl margin-bottom-large margin-top" >
2019-05-13 01:03:30 +12:00
Users
2019-05-09 18:54:39 +12:00
< / h1 >
< / div >
2019-05-13 01:03:30 +12:00
< div class = "zone xl" >
2019-05-09 20:23:22 +12:00
< ul class = "phases clear" data-ui-phases data-selected = "{{router.params.tab}}" >
< li data-state = "/console/users?project={{router.params.project}}" >
2019-05-09 18:54:39 +12:00
2019-05-13 01:03:30 +12:00
< h2 > Users< / h2 >
2019-05-09 18:54:39 +12:00
< div >
< div class = "row responsive force-reverse clear margin-bottom-tiny" >
< div class = "col span-2" >
< div class = "clear" >
2019-08-07 00:22:54 +12:00
< div data-ui-modal class = "box modal close" data-button-text = "" data-button-class = "pull-end round" data-button-icon = "icon-plus" >
2019-05-13 08:27:33 +12:00
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2019-05-09 18:54:39 +12:00
< h1 > Create User< / h1 >
2019-08-06 18:42:47 +12:00
< form data-service = "users.createUser" data-event = "submit" data-success = "alert,trigger,reset" data-success-alert = "Created user successfully" data-success-triggers = "filter-users-changed,user.new,modal-close" data-error = "alert" data-error-alert = "Failed to create user" >
2019-05-09 18:54:39 +12:00
< label for = "user-name" > Name< / label >
< input type = "text" class = "full-width" id = "user-name" name = "name" required autocomplete = "off" / >
< label for = "user-email" > Email< / label >
< input type = "email" class = "full-width" id = "user-email" name = "email" required autocomplete = "off" / >
< label for = "user-password" > Password< / label >
< input type = "password" class = "full-width" id = "user-password" name = "password" required autocomplete = "off" / >
2019-08-07 00:22:54 +12:00
< hr / >
2019-05-13 08:27:33 +12:00
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
2019-05-09 18:54:39 +12:00
< / form >
< / div >
< / div >
< / div >
< div class = "col span-6" > < / div >
< div class = "col span-4" >
< div class = "margin-bottom-small" >
< form class = "" data-forms-filter = "filter-users" data-event = "init" >
< input type = "hidden" name = "offset" value = "0" >
< input type = "hidden" name = "limit" value = "10" >
2019-08-07 00:22:54 +12:00
< input name = "search" id = "searchUsers" type = "search" autocomplete = "off" placeholder = "Search" class = "strip margin-bottom-no" >
2019-05-09 18:54:39 +12:00
< / form >
< / div >
< / div >
< / div >
2019-08-06 18:42:47 +12:00
< div data-service = "users.listUsers" data-event = "load" data-param-search = "" data-param-limit = "25" data-param-offset = "0" data-scope = "sdk" data-name = "project-users" >
2019-05-09 18:54:39 +12:00
2019-05-12 23:20:51 +12:00
< div data-ls-if = "0 == {{project-users.sum}}" class = "box margin-bottom" >
2019-05-09 18:54:39 +12:00
< h3 class = "margin-bottom" > No Users Found< / h3 >
< p class = "margin-bottom-no" > Create your first user to get started< / p >
< / div >
< div data-ls-if = "0 != {{project-users.sum}}" style = "display: none;" >
< div class = "box margin-bottom" >
< table class = "vertical" >
< thead >
2019-08-06 16:44:34 +12:00
< tr >
< th width = "30" > < / th >
< th width = "180" > Name< / th >
< th width = "200" > Email< / th >
< th > Status< / th >
< th width = "100" > Created< / th >
< / tr >
2019-05-09 18:54:39 +12:00
< / thead >
< tbody data-ls-loop = "project-users.users" data-ls-as = "user" >
2019-08-06 16:44:34 +12:00
< tr >
< td >
2019-08-07 00:22:54 +12:00
< img src = "" data-ls-attrs = "src={{user.email|gravatar}}" alt = "User Avatar" class = "avatar pull-start" / >
2019-08-06 16:44:34 +12:00
< / td >
< td data-title = "Name: " >
< a data-ls-attrs = "href=/console/users/view?id={{user.$uid}}&project={{router.params.project}}" data-ls-bind = "{{user.name}}" > < / a >
< / td >
< td data-title = "Email: " >
< span data-ls-bind = "{{user.email}}" class = "note" > < / span >
< / td >
< td data-title = "Status: " >
< span data-ls-if = "{{user.confirm}} === true" >
< span class = "tag green" > Verified< / span >
< / span >
< span data-ls-if = "{{user.confirm}} !== true" >
< span class = "tag" > Unverified< / span >
< / span >
< span data-ls-if = "{{user.status}} === <?php echo \Auth\Auth :: USER_STATUS_BLOCKED ; ?> " >
< span class = "tag red" > Blocked< / span >
< / span >
< / td >
< td data-title = "Created: " > < span data-ls-bind = "{{user.registration|date-text}}" class = "note" > < / span > < / td >
< / tr >
2019-05-09 18:54:39 +12:00
< / tbody >
< / table >
< / div >
< div class = "clear" >
< span class = "pull-end paging" data-ls-ui-paging = "" data-sum = "{{project-users.sum}}" data-offset = "{{filter-users.keys.offset}}" data-limit = "{{filter-users.keys.limit}}" > < / span >
< span data-ls-if = "{{filter-users.backward}} >= 0" style = "display: none;" >
< button type = "button" class = "margin-end round" data-forms-filter = "filter-users" data-params = " <?php echo $this -> escape ( json_encode ([ 'offset' => '{{filter-users.backward}}' ])); ?> " aria-label = "Back" >< i class = "icon-left-open" ></ i ></ button >
< / span >
< span data-ls-if = "{{filter-users.backward}} < 0" style = "display: none;" >
< button type = "button" class = "disabled margin-end round" disabled aria-label = "Back" > < i class = "icon-left-open" > < / i > < / button >
< / span >
< span data-ls-if = "{{filter-users.forward}} < {{project-users.sum}}" style = "display: none;" >
< button type = "button" class = "margin-end round" data-forms-filter = "filter-users" data-params = " <?php echo $this -> escape ( json_encode ([ 'offset' => '{{filter-users.forward}}' ])); ?> " aria-label = "Next" >< i class = "icon-right-open" ></ i ></ button >
< / span >
< span data-ls-if = "{{filter-users.forward}} >= {{project-users.sum}}" style = "display: none;" >
< button type = "button" class = "disabled margin-end round" disabled aria-label = "Next" > < i class = "icon-right-open" > < / i > < / button >
< / span >
< / div >
< / div >
< / div >
< / div >
< / li >
2019-05-09 20:23:22 +12:00
< li data-state = "/console/users/teams?project={{router.params.project}}" >
2019-05-13 01:03:30 +12:00
< h2 > Teams< / h2 >
2019-05-09 18:54:39 +12:00
< div >
< div class = "row responsive force-reverse clear margin-bottom-tiny" >
< div class = "col span-2" >
< div data-ui-modal class = "modal close" data-button-text = "" data-button-class = "pull-end round" data-button-icon = "icon-plus" >
2019-05-13 08:27:33 +12:00
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2019-05-09 18:54:39 +12:00
< h1 > Create Team< / h1 >
2019-08-06 16:44:34 +12:00
< form data-service = "teams.create" data-event = "submit" data-success = "alert,trigger,reset" data-success-alert = "Created team successfully" data-success-triggers = "filter-teams-changed,team.new,modal-close" data-error = "alert" data-error-alert = "Failed to create team" >
2019-05-09 18:54:39 +12:00
2019-08-07 00:22:54 +12:00
< label for = "team-name" > Name< / label >
< input type = "text" class = "full-width" id = "team-name" name = "name" required autocomplete = "off" / >
2019-05-09 18:54:39 +12:00
2019-05-13 08:27:33 +12:00
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
2019-05-09 18:54:39 +12:00
< / form >
< / div >
< / div >
< div class = "col span-6" > < / div >
< div class = "col span-4" >
< div class = "margin-bottom-small" >
< form data-forms-filter = "filter-teams" data-event = "init" >
< input type = "hidden" name = "offset" value = "0" >
< input type = "hidden" name = "limit" value = "10" >
2019-08-07 00:22:54 +12:00
< input name = "search" id = "searchTeams" type = "search" autocomplete = "off" placeholder = "Search" class = "strip margin-bottom-no" >
2019-05-09 18:54:39 +12:00
< / form >
< / div >
< / div >
< / div >
2019-08-07 00:22:54 +12:00
< div class = "zone xl" data-service = "teams.listTeams" data-scope = "sdk" data-name = "project-teams" data-event = "load" data-param-search = "{{filter-teams.keys.search}}" data-param-limit = "{{filter-teams.keys.limit}}" data-param-offset = "{{filter-teams.keys.offset}}" data-success = "trigger,render" data-error = "render" data-success-rerender = "team.update,team.new,filter-teams-changed" data-error-rerender = "" data-success-triggers = "teams.load" >
2019-05-09 18:54:39 +12:00
< div data-ls-if = "0 == {{project-teams.sum}}" class = "box margin-bottom" style = "display: none;" >
< h3 class = "margin-bottom" > No Teams Found< / h3 >
< p class = "margin-bottom-no" > Create your first team to get started< / p >
< / div >
< div data-ls-if = "0 != {{project-teams.sum}}" style = "display: none;" >
< div class = "box margin-bottom" >
< table class = "vertical" >
< thead >
2019-08-06 16:44:34 +12:00
< tr >
< th > Name< / th >
< th > Members< / th >
< th width = "150" > Created< / th >
< / tr >
2019-05-09 18:54:39 +12:00
< / thead >
< tbody data-ls-loop = "project-teams.teams" data-ls-as = "team" >
2019-08-06 16:44:34 +12:00
< tr >
< td data-title = "Name: " >
< div data-ui-modal class = "modal close" data-button-text = "{{team.name}}" data-button-class = "link" >
< h1 > Update Team< / h1 >
< form data-service = "teams.update" data-scope = "sdk" data-event = "submit" data-success = "alert,trigger" data-success-alert = "Updated team successfully" data-success-triggers = "team.update,filter-teams-changed,modal-close" data-error = "alert" data-error-alert = "Failed to update team" >
< label for = "name" > UID< / label >
< div class = "input-copy" >
< input name = "teamId" data-forms-copy type = "text" disabled data-ls-bind = "{{team.$uid}}" / >
< / div >
< label for = "name" > Name< / label >
< input name = "name" id = "name" type = "text" autocomplete = "off" data-ls-bind = "{{team.name}}" >
< button > Update< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / form >
< / div >
< / td >
< td data-title = "Members: " > < span data-ls-bind = "{{team.sum}}" > < / span > < / td >
< td data-title = "Date Created: " > < span data-ls-bind = "{{team.dateCreated|date-text}}" class = "note" > < / span > < / td >
< / tr >
2019-05-09 18:54:39 +12:00
< / tbody >
< / table >
< / div >
< div class = "clear" >
< span class = "pull-end paging" data-ls-ui-paging = "" data-sum = "{{project-teams.sum}}" data-offset = "{{filter-teams.keys.offset}}" data-limit = "{{filter-teams.keys.limit}}" > < / span >
< span data-ls-if = "{{filter-teams.backward}} >= 0" style = "display: none;" >
< button type = "button" class = "margin-end round" data-forms-filter = "filter-teams" data-params = " <?php echo $this -> escape ( json_encode ([ 'offset' => '{{filter-teams.backward}}' ])); ?> " aria-label = "Back" >< i class = "icon-left-open" ></ i ></ button >
< / span >
< span data-ls-if = "{{filter-teams.backward}} < 0" style = "display: none;" >
< button type = "button" class = "disabled margin-end round" disabled aria-label = "Back" > < i class = "icon-left-open" > < / i > < / button >
< / span >
< span data-ls-if = "{{filter-teams.forward}} < {{project-teams.sum}}" style = "display: none;" >
< button type = "button" class = "margin-end round" data-forms-filter = "filter-teams" data-params = " <?php echo $this -> escape ( json_encode ([ 'offset' => '{{filter-teams.forward}}' ])); ?> " aria-label = "Next" >< i class = "icon-right-open" ></ i ></ button >
< / span >
< span data-ls-if = "{{filter-teams.forward}} >= {{project-teams.sum}}" style = "display: none;" >
< button type = "button" class = "disabled margin-end round" disabled aria-label = "Next" > < i class = "icon-right-open" > < / i > < / button >
< / span >
< / div >
< / div >
< / div >
< / div >
< / li >
2019-05-09 20:23:22 +12:00
< li data-state = "/console/users/providers?project={{router.params.project}}" >
2019-05-13 01:03:30 +12:00
< h2 > Providers< / h2 >
2019-05-09 18:54:39 +12:00
< div class = "box margin-bottom margin-top-large" >
< ul class = "list" >
2019-08-06 16:44:34 +12:00
<?php foreach ( $providers as $provider => $data ) : ?>
2019-05-09 18:54:39 +12:00
< li class = "clear <?php echo ( isset ( $data [ 'enabled' ]) && ! $data [ 'enabled' ]) ? 'dev-feature' : '' ; ?> " >
< div data-ui-modal class = "modal close" data-button-text = "Settings" data-button-class = "pull-end" >
2019-05-13 08:55:33 +12:00
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2019-05-09 18:54:39 +12:00
< h1 > <?php echo ucfirst ( $provider ); ?> OAuth Settings</ h1 >
2019-08-06 18:42:47 +12:00
< form data-service = "projects.updateProjectOAuth" data-scope = "console" data-event = "submit" data-param-project-id = "{{router.params.project}}" data-success = "alert,trigger" data-success-alert = "Updated project OAuth settings successfully" data-success-triggers = "project.reload,modal-close" data-error = "alert" data-error-alert = "Failed to update project OAuth settings" >
< input name = "provider" id = "provider <?php echo ucfirst ( $provider ); ?> " type = "hidden" autocomplete = "off" value = " <?php echo $provider ; ?> " >
2019-05-09 18:54:39 +12:00
< label for = "oauth <?php echo ucfirst ( $provider ); ?> Appid" > App ID</ label >
2019-05-10 04:15:51 +12:00
< input name = "appId" id = "oauth <?php echo ucfirst ( $provider ); ?> Appid" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.usersOauth <?php echo ucfirst ( $provider ); ?> Appid}}" >
2019-05-09 18:54:39 +12:00
< label for = "oauth <?php echo ucfirst ( $provider ); ?> Secret" > App Secret</ label >
2019-05-10 04:15:51 +12:00
< input name = "secret" id = "oauth <?php echo ucfirst ( $provider ); ?> Secret" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.usersOauth <?php echo ucfirst ( $provider ); ?> Secret}}" >
2019-05-09 18:54:39 +12:00
< div class = "info row thin margin-bottom margin-top" >
< div class = "col span-1" >
< i class = "icon-info-circled text-sign" > < / i >
< / div >
< div class = "col span-11" >
< p > To complete set up, add this OAuth redirect URI to your <?php echo ucfirst ( $provider ); ?> app configuration.</ p >
< div class = "input-copy" >
2019-05-10 04:15:51 +12:00
< input data-forms-copy type = "text" disabled data-ls-bind = "https://{{env.DOMAIN}}/v1/oauth/callback/ <?php echo $provider ; ?> /{{router.params.project}}" class = "margin-bottom-no" />
2019-05-09 18:54:39 +12:00
< / div >
< / div >
< / div >
2019-05-13 08:27:33 +12:00
< button > Update< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
2019-05-09 18:54:39 +12:00
< / form >
< / div >
< div class = "pull-start provider margin-end <?php echo $provider ; ?> " >
< i class = " <?php echo $data [ 'icon' ]; ?> " ></ i >
< / div >
< span >
2019-08-06 16:44:34 +12:00
<?php echo ucfirst ( $provider ); ?>
2019-05-12 03:26:03 +12:00
< span data-ls-if = "{{console-project.usersOauth <?php echo ucfirst ( $provider ); ?> Appid}} === '' || {{console-project.usersOauth <?php echo ucfirst ( $provider ); ?> Secret}} == '' || {{console-project.usersOauth <?php echo ucfirst ( $provider ); ?> Appid}} === undefined || {{console-project.usersOauth <?php echo ucfirst ( $provider ); ?> Secret}} === undefined" >
2019-08-06 16:44:34 +12:00
< span class = "tag red" > Disabled< / span >
< / span >
2019-05-09 18:54:39 +12:00
< / span >
< p class = "margin-bottom-no margin-top-small text-one-liner" >
< a href = " <?php echo $data [ 'developers' ]; ?> " target = "_blank" rel = "noopener" > Learn More< i class = "icon-link-ext" ></ i ></ a >
< a href = " <?php echo $data [ 'developers' ]; ?> " target = "_blank" rel = "noopener" > Developer Docs< i class = "icon-link-ext" ></ i ></ a >
< / p >
< / li >
<?php endforeach ; ?>
< / ul >
< / div >
< / li >
2019-08-06 16:44:34 +12:00
<!-- <li data - state="/console/users/templates?project={{router.params.project}}">
2019-05-13 01:03:30 +12:00
< h2 > Templates< / h2 >
2019-05-13 08:55:33 +12:00
< / li > -->
2019-05-09 18:54:39 +12:00
< / ul >
< / div >