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-08-12 09:17:01 +02:00
|
|
|
{{#gh-view-title openMobileMenu="openMobileMenu"}}<span>Team</span>{{/gh-view-title}}
|
2015-06-30 14:21:03 +01:00
|
|
|
{{!-- Do not show Invite user button to authors --}}
|
|
|
|
{{#unless session.user.isAuthor}}
|
|
|
|
<section class="view-actions">
|
|
|
|
<button class="btn btn-green" {{action "openModal" "invite-new-user"}} >Invite People</button>
|
|
|
|
</section>
|
|
|
|
{{/unless}}
|
2014-10-16 15:28:51 +00:00
|
|
|
</header>
|
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
{{#gh-infinite-scroll
|
|
|
|
fetch="loadNextPage"
|
|
|
|
isLoading=isLoading
|
|
|
|
tagName="section"
|
2015-06-30 14:21:03 +01:00
|
|
|
classNames="view-content team"
|
2015-06-13 09:34:09 -05:00
|
|
|
}}
|
2015-06-30 14:21:03 +01:00
|
|
|
{{!-- Do not show invited users to authors --}}
|
|
|
|
{{#unless session.user.isAuthor}}
|
|
|
|
{{#if invitedUsers}}
|
|
|
|
<section class="user-list invited-users">
|
|
|
|
<h4 class="user-list-title">Invited users</h4>
|
|
|
|
{{#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>
|
2015-07-14 16:20:40 +02:00
|
|
|
{{#if user.pending}}
|
|
|
|
<span class="description-error">
|
|
|
|
Invitation not sent - please try again
|
|
|
|
</span>
|
2015-06-30 14:21:03 +01:00
|
|
|
{{else}}
|
|
|
|
<span class="description">
|
|
|
|
Invitation sent: {{component.createdAt}}
|
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<aside class="user-list-item-aside">
|
2015-08-20 10:25:30 +01:00
|
|
|
{{#if component.isSending}}
|
|
|
|
<span>Sending Invite...</span>
|
|
|
|
{{else}}
|
|
|
|
<a class="user-list-action" href="#" {{action "revoke" target=component}}>
|
|
|
|
Revoke
|
|
|
|
</a>
|
|
|
|
<a class="user-list-action" href="#" {{action "resend" target=component}}>
|
|
|
|
Resend
|
|
|
|
</a>
|
|
|
|
{{/if}}
|
2015-06-30 14:21:03 +01:00
|
|
|
</aside>
|
2015-06-13 09:34:09 -05:00
|
|
|
</div>
|
2015-06-30 14:21:03 +01:00
|
|
|
{{/gh-user-invited}}
|
|
|
|
{{/each}}
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
|
|
|
{{/unless}}
|
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|}}
|
2015-06-30 14:21:03 +01:00
|
|
|
{{!-- For authors only shows users as a list, otherwise show users with links to user page --}}
|
|
|
|
{{#unless session.user.isAuthor}}
|
|
|
|
{{#gh-user-active user=user as |component|}}
|
|
|
|
{{#link-to 'team.user' user class="user-list-item"}}
|
|
|
|
{{partial 'user-list-item'}}
|
|
|
|
{{/link-to}}
|
|
|
|
{{/gh-user-active}}
|
|
|
|
{{else}}
|
|
|
|
{{#gh-user-active user=user as |component|}}
|
|
|
|
<li class="ember-view active user-list-item">{{partial 'user-list-item'}}</li>
|
|
|
|
{{/gh-user-active}}
|
|
|
|
{{/unless}}
|
2015-06-13 09:34:09 -05:00
|
|
|
{{/each}}
|
2014-07-06 16:56:29 +01:00
|
|
|
</section>
|
2015-06-13 09:34:09 -05:00
|
|
|
{{/gh-infinite-scroll}}
|
|
|
|
</section>
|