bitwarden-estensione-browser/src/app/organizations/manage/people.component.html

95 lines
5.8 KiB
HTML
Raw Normal View History

2018-07-06 21:01:23 +02:00
<div class="page-header d-flex">
2018-07-06 16:21:08 +02:00
<h1>{{'people' | i18n}}</h1>
2018-07-06 21:01:23 +02:00
<div class="ml-auto d-flex">
2018-07-11 22:40:32 +02:00
<div class="btn-group btn-group-sm" role="group">
<button type="button" class="btn btn-outline-secondary" [ngClass]="{active: status == null}" (click)="filter(null)">
{{'all' | i18n}}
</button>
<button type="button" class="btn btn-outline-secondary" [ngClass]="{active: status == organizationUserStatusType.Invited}"
(click)="filter(organizationUserStatusType.Invited)">
{{'invited' | i18n}}
<span class="badge badge-pill badge-info" *ngIf="invitedCount">{{invitedCount}}</span>
</button>
<button type="button" class="btn btn-outline-secondary" [ngClass]="{active: status == organizationUserStatusType.Accepted}"
(click)="filter(organizationUserStatusType.Accepted)">
{{'accepted' | i18n}}
<span class="badge badge-pill badge-warning" *ngIf="acceptedCount">{{acceptedCount}}</span>
</button>
2018-07-06 21:45:35 +02:00
</div>
<div class="ml-3">
2018-07-06 21:01:23 +02:00
<label class="sr-only" for="search">{{'search' | i18n}}</label>
<input type="search" class="form-control form-control-sm" id="search" placeholder="{{'search' | i18n}}" [(ngModel)]="searchText">
</div>
2018-07-09 23:07:13 +02:00
<button type="button" class="btn btn-sm btn-outline-primary ml-3" (click)="invite()">
2018-07-06 21:01:23 +02:00
<i class="fa fa-plus fa-fw"></i>
{{'inviteUser' | i18n}}
</button>
</div>
2018-07-06 16:21:08 +02:00
</div>
2018-07-18 05:15:15 +02:00
<i class="fa fa-spinner fa-spin text-muted" *ngIf="loading" title="{{'loading' | i18n}}"></i>
2018-07-06 21:03:54 +02:00
<ng-container *ngIf="!loading && (users | search:searchText:'name':'email':'id') as searchedUsers">
2018-07-11 22:40:32 +02:00
<p *ngIf="!searchedUsers.length">{{'noUsersInList' | i18n}}</p>
<ng-container *ngIf="searchedUsers.length">
<app-callout type="info" title="{{'confirmUsers' | i18n}}" icon="fa-check-circle" *ngIf="showConfirmUsers">
{{'usersNeedConfirmed' | i18n}}
</app-callout>
<table class="table table-hover table-list">
<tbody>
<tr *ngFor="let u of searchedUsers">
<td width="30">
<app-avatar [data]="u.name || u.email" [email]="u.email" size="25" [circle]="true" [fontSize]="14"></app-avatar>
</td>
<td>
<a href="#" appStopClick (click)="edit(u)">{{u.email}}</a>
<span class="badge badge-secondary" *ngIf="u.status === organizationUserStatusType.Invited">{{'invited' | i18n}}</span>
<span class="badge badge-warning" *ngIf="u.status === organizationUserStatusType.Accepted">{{'accepted' | i18n}}</span>
<small class="text-muted d-block" *ngIf="u.name">{{u.name}}</small>
</td>
<td>
<i class="fa fa-lock" *ngIf="u.twoFactorEnabled" title="{{'userUsingTwoStep' | i18n}}"></i>
</td>
<td>
<span *ngIf="u.type === organizationUserType.Owner">{{'owner' | i18n}}</span>
<span *ngIf="u.type === organizationUserType.Admin">{{'admin' | i18n}}</span>
<span *ngIf="u.type === organizationUserType.Manager">{{'manager' | i18n}}</span>
<span *ngIf="u.type === organizationUserType.User">{{'user' | i18n}}</span>
</td>
<td class="table-list-options">
<div class="dropdown" appListDropdown>
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-cog fa-lg"></i>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#" appStopClick (click)="reinvite(u)" *ngIf="u.status === organizationUserStatusType.Invited">
<i class="fa fa-fw fa-envelope-o"></i>
{{'resendInvitation' | i18n}}
</a>
<a class="dropdown-item text-success" href="#" appStopClick (click)="confirm(u)" *ngIf="u.status === organizationUserStatusType.Accepted">
<i class="fa fa-fw fa-check"></i>
{{'confirm' | i18n}}
</a>
<a class="dropdown-item" href="#" appStopClick (click)="groups(u)" *ngIf="accessGroups">
<i class="fa fa-fw fa-sitemap"></i>
{{'groups' | i18n}}
</a>
<a class="dropdown-item" href="#" appStopClick (click)="events(u)" *ngIf="accessEvents && u.status === organizationUserStatusType.Confirmed">
<i class="fa fa-fw fa-file-text-o"></i>
{{'eventLogs' | i18n}}
</a>
<a class="dropdown-item text-danger" href="#" appStopClick (click)="remove(u)">
<i class="fa fa-fw fa-remove"></i>
{{'remove' | i18n}}
</a>
</div>
2018-07-06 21:01:23 +02:00
</div>
</td>
</tr>
</tbody>
</table>
</ng-container>
2018-07-06 21:01:23 +02:00
</ng-container>
2018-07-10 20:46:13 +02:00
<ng-template #addEdit></ng-template>
<ng-template #groupsTemplate></ng-template>
2018-07-11 20:43:00 +02:00
<ng-template #eventsTemplate></ng-template>
2018-11-15 05:13:50 +01:00
<ng-template #confirmTemplate></ng-template>