2015-06-13 09:34:09 -05:00
|
|
|
<section class="gh-view">
|
2015-05-12 12:09:45 +01:00
|
|
|
<header class="view-header">
|
2015-05-27 16:39:56 +02:00
|
|
|
{{#gh-view-title openMobileMenu="openMobileMenu"}}Team{{/gh-view-title}}
|
2015-05-12 12:09:45 +01:00
|
|
|
<section class="view-actions">
|
|
|
|
<button class="btn btn-green" {{action "openModal" "invite-new-user"}} >Invite People</button>
|
2014-10-16 15:28:51 +00:00
|
|
|
</section>
|
|
|
|
</header>
|
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
{{#gh-infinite-scroll
|
|
|
|
fetch="loadNextPage"
|
|
|
|
isLoading=isLoading
|
|
|
|
tagName="section"
|
|
|
|
classNames="view-content settings-users"
|
|
|
|
}}
|
2015-05-25 13:17:10 -05:00
|
|
|
{{#if invitedUsers}}
|
|
|
|
<section class="user-list invited-users">
|
|
|
|
<h4 class="user-list-title">Invited users</h4>
|
2015-06-13 09:34:09 -05:00
|
|
|
{{#each invitedUsers as |user|}}
|
|
|
|
{{#gh-user-invited user=user reload="reload" as |component|}}
|
|
|
|
<div class="user-list-item">
|
|
|
|
<span class="user-list-item-icon icon-mail">ic</span>
|
|
|
|
<div class="user-list-item-body">
|
|
|
|
<span class="name">{{user.email}}</span><br>
|
|
|
|
{{#if user.model.pending}}
|
|
|
|
<span class="red">Invitation not sent - please try again</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="description">
|
|
|
|
Invitation sent: {{component.createdAt}}
|
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<aside class="user-list-item-aside">
|
|
|
|
<a class="user-list-action" href="#" {{action "revoke" target=component}}>
|
|
|
|
Revoke
|
|
|
|
</a>
|
|
|
|
<a class="user-list-action" href="#" {{action "resend" target=component}}>
|
|
|
|
Resend
|
|
|
|
</a>
|
|
|
|
</aside>
|
2015-05-25 13:17:10 -05:00
|
|
|
</div>
|
2015-06-13 09:34:09 -05:00
|
|
|
{{/gh-user-invited}}
|
2015-05-25 13:17:10 -05:00
|
|
|
{{/each}}
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
2014-07-06 16:56:29 +01:00
|
|
|
|
2015-05-25 13:17:10 -05:00
|
|
|
<section class="user-list active-users">
|
|
|
|
<h4 class="user-list-title">Active users</h4>
|
2015-06-13 09:34:09 -05:00
|
|
|
{{#each activeUsers key="id" as |user|}}
|
|
|
|
{{#gh-user-active user=user as |component|}}
|
|
|
|
{{#link-to 'team.user' user class="user-list-item" }}
|
|
|
|
<span class="user-list-item-figure" style={{component.userImageBackground}}>
|
|
|
|
<span class="hidden">Photo of {{user.name}}</span>
|
2015-05-25 13:17:10 -05:00
|
|
|
</span>
|
2014-07-01 23:44:39 -04:00
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
<div class="user-list-item-body">
|
|
|
|
<span class="name">
|
|
|
|
{{user.name}}
|
|
|
|
</span>
|
|
|
|
<br>
|
|
|
|
<span class="description">Last seen: {{component.lastLogin}}</span>
|
|
|
|
</div>
|
|
|
|
<aside class="user-list-item-aside">
|
|
|
|
{{#unless user.isAuthor}}
|
|
|
|
{{#each user.roles key="id" as |role|}}
|
|
|
|
<span class="role-label {{role.lowerCaseName}}">{{role.name}}</span>
|
|
|
|
{{/each}}
|
|
|
|
{{/unless}}
|
|
|
|
</aside>
|
|
|
|
{{/link-to}}
|
|
|
|
{{/gh-user-active}}
|
|
|
|
{{/each}}
|
2014-07-06 16:56:29 +01:00
|
|
|
</section>
|
2015-06-13 09:34:09 -05:00
|
|
|
{{/gh-infinite-scroll}}
|
|
|
|
</section>
|