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.
 
 
 
 
 

88 lines
3.8 KiB

<sqx-title message="Contributors"></sqx-title>
<sqx-panel desiredWidth="50rem" contentClass="grid" [showSidebar]="true">
<ng-container title>
Contributors
</ng-container>
<ng-container menu>
<button type="button" class="btn btn-text-secondary mr-2" (click)="reload()" title="Refresh contributors (CTRL + SHIFT + R)">
<i class="icon-reset"></i> Refresh
</button>
<sqx-shortcut keys="ctrl+shift+r" (trigger)="reload()"></sqx-shortcut>
<div class="form-inline">
<input class="form-control" placeholder="Search"
[ngModel]="contributorsState.query | async"
(ngModelChange)="search($event)"
/>
</div>
</ng-container>
<ng-container content>
<ng-container *ngIf="contributorsState.isLoaded | async">
<ng-container *ngIf="contributorsState.contributorsPaged | async; let contributors">
<ng-container *ngIf="rolesState.roles | async; let roles">
<ng-container *ngIf="contributorsState.maxContributors | async; let maxContributors">
<div class="panel-alert panel-alert-success" *ngIf="maxContributors > 0">
Your plan allows up to {{maxContributors}} contributors.
</div>
</ng-container>
<ng-container *ngIf="contributorsState.canCreate | async">
<sqx-contributor-add-form
[roles]="roles">
</sqx-contributor-add-form>
</ng-container>
<div class="grid-content">
<div class="import-hint">
<sqx-form-hint class="text-right">
Big team? <a class="force" (click)="importDialog.show()">Add many contributors at once</a>
</sqx-form-hint>
</div>
<ng-container *ngIf="contributors.length > 0; else noContributors">
<table class="table table-items table-fixed">
<tbody *ngFor="let contributor of contributors; trackBy: trackByContributor"
[sqxContributor]="contributor"
[search]="contributorsState.snapshot.queryRegex"
[roles]="roles">
</tbody>
</table>
<sqx-pager [pager]="contributorsState.contributorsPager | async" [autoHide]="true" (prevPage)="goPrev()" (nextPage)="goNext()"></sqx-pager>
</ng-container>
<ng-template #noContributors>
<div class="table-items-row table-items-row-empty">
No contributors found.
</div>
</ng-template>
</div>
</ng-container>
</ng-container>
</ng-container>
</ng-container>
<ng-container sidebar>
<div class="panel-nav">
<a class="panel-link" routerLink="history" routerLinkActive="active" title="History" titlePosition="left">
<i class="icon-time"></i>
</a>
<a class="panel-link" routerLink="help" routerLinkActive="active" title="Help" titlePosition="left">
<i class="icon-help2"></i>
</a>
</div>
</ng-container>
</sqx-panel>
<ng-container *sqxModal="importDialog">
<sqx-import-contributors-dialog [roles]="rolesState.roles | async"
(close)="importDialog.hide()">
</sqx-import-contributors-dialog>
</ng-container>
<router-outlet></router-outlet>