Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

89 lines
4.0 KiB

<sqx-title message="User Management"></sqx-title>
<sqx-panel desiredWidth="50rem" contentClass="grid">
<ng-container title>
Users
</ng-container>
<ng-container menu>
<button type="button" class="btn btn-text-secondary mr-1" (click)="reload()" title="Refresh Users (CTRL + SHIFT + R)">
<i class="icon-reset"></i> Refresh
</button>
<sqx-shortcut keys="ctrl+shift+r" (trigger)="reload()"></sqx-shortcut>
<sqx-shortcut keys="ctrl+shift+f" (trigger)="inputFind.focus()"></sqx-shortcut>
<sqx-shortcut keys="ctrl+shift+n" (trigger)="buttonNew.click()"></sqx-shortcut>
<form class="form-inline mr-1" (ngSubmit)="search()">
<input class="form-control" #inputFind [formControl]="usersFilter" placeholder="Search for user" />
</form>
<button type="button" class="btn btn-success" #buttonNew routerLink="new" title="New User (CTRL + N)">
<i class="icon-plus"></i> New
</button>
</ng-container>
<ng-container content>
<div class="grid-header">
<table class="table table-items table-fixed">
<thead>
<tr>
<th class="cell-user">
&nbsp;
</th>
<th class="cell-auto">
Name
</th>
<th class="cell-auto">
Email
</th>
<th class="cell-actions">
Actions
</th>
</tr>
</thead>
</table>
</div>
<div class="grid-content">
<div sqxIgnoreScrollbar>
<table class="table table-items table-fixed">
<tbody *ngFor="let userInfo of usersState.users | async; trackBy: trackByUser">
<tr [routerLink]="userInfo.user.id" routerLinkActive="active">
<td class="cell-user">
<img class="user-picture" [attr.alt]="userInfo.user.name" [attr.title]="userInfo.user.name" [attr.src]="userInfo.user | sqxUserDtoPicture" />
</td>
<td class="cell-auto">
<span class="user-name table-cell">{{userInfo.user.displayName}}</span>
</td>
<td class="cell-auto">
<span class="user-email table-cell">{{userInfo.user.email}}</span>
</td>
<td class="cell-actions">
<ng-container *ngIf="!userInfo.isCurrentUser">
<button type="button" class="btn btn-text" (click)="lock(userInfo.user)" *ngIf="!userInfo.user.isLocked" title="Lock User">
<i class="icon icon-unlocked"></i>
</button>
<button type="button" class="btn btn-text" (click)="unlock(userInfo.user)" *ngIf="userInfo.user.isLocked" title="Unlock User">
<i class="icon icon-lock"></i>
</button>
</ng-container>
<button *ngIf="userInfo.isCurrentUser" class="btn btn-text invisible">
&nbsp;
</button>
</td>
</tr>
<tr class="spacer"></tr>
</tbody>
</table>
</div>
</div>
<div class="grid-footer">
<sqx-pager [pager]="usersState.usersPager | async" (prevPage)="goPrev()" (nextPage)="goNext()"></sqx-pager>
</div>
</ng-container>
</sqx-panel>
<router-outlet></router-outlet>