67 lines
3.2 KiB
Handlebars
67 lines
3.2 KiB
Handlebars
<div class="page-header">
|
|
<div>
|
|
<h2>Pending invitations</h2>
|
|
<p>Invitations that have not yet been accepted.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card card-outline card-primary" data-table-search-container data-table-pagination-card>
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<h3 class="card-title">Active invitations</h3>
|
|
<div class="card-tools d-flex flex-nowrap align-items-center gap-2">
|
|
<div class="input-group input-group-sm flex-shrink-1 table-search-group" style="width: min(14rem, 100%);">
|
|
<span class="input-group-text" role="button" tabindex="0" aria-label="Search" data-table-search-toggle><i class="bi bi-search"></i></span>
|
|
<input type="search" class="form-control" placeholder="Search invitations" aria-label="Search invitations" data-table-search />
|
|
</div>
|
|
{{#if (hasPermission currentUser 'invitations.create')}}
|
|
<a href="/settings/users/invite" class="btn btn-info btn-sm">Invite user</a>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
<div class="card-body table-responsive p-0">
|
|
<table class="table table-striped w-100 mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th data-table-sort-key="email">Email</th>
|
|
<th data-table-sort-key="name">Name</th>
|
|
<th>Roles</th>
|
|
<th data-table-sort-key="created">Sent</th>
|
|
<th data-table-sort-key="expires">Expires</th>
|
|
<th data-table-sort-key="createdBy">Sent by</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#if invitations.length}}
|
|
{{#each invitations}}
|
|
<tr data-table-search-row>
|
|
<td data-label="Email">{{email}}</td>
|
|
<td data-label="Name">{{#if name}}{{name}}{{else}}-{{/if}}</td>
|
|
<td data-label="Roles">{{roleNames}}</td>
|
|
<td data-label="Sent">{{createdAtLabel}}</td>
|
|
<td data-label="Expires">{{expiresAtLabel}}</td>
|
|
<td data-label="Sent by">{{createdByLabel}}</td>
|
|
<td data-label="Actions">
|
|
<div class="actions users-row-actions">
|
|
{{#if (hasPermission ../currentUser 'invitations.allow')}}
|
|
<form method="post" action="/settings/invitations/{{id}}/resend" class="inline-form" data-confirm-message="Resend invitation to {{email}}?">
|
|
<button type="submit" class="btn btn-sm btn-primary">Resend</button>
|
|
</form>
|
|
{{/if}}
|
|
{{#if (hasPermission ../currentUser 'invitations.delete')}}
|
|
<form method="post" action="/settings/invitations/{{id}}/delete" class="inline-form" data-confirm-message="Delete invitation for {{email}}?">
|
|
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
|
|
</form>
|
|
{{/if}}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
{{else}}
|
|
<tr data-table-search-empty-default><td colspan="7" class="empty">No pending invitations.</td></tr>
|
|
{{/if}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{> table-pagination pagination=pagination basePath="/settings/invitations" alwaysShow=true}}
|
|
</div> |