-<div class="row">
- <div class="content-padding">
+<div class="admin-sub-header">
+ <div class="admin-sub-title">Users list</div>
- <h3>Users list</h3>
-
- <p-dataTable
- [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
- sortField="id" (onLazyLoad)="loadLazy($event)"
- >
- <p-column field="id" header="ID" [sortable]="true"></p-column>
- <p-column field="username" header="Username" [sortable]="true"></p-column>
- <p-column field="email" header="Email"></p-column>
- <p-column field="videoQuota" header="Video quota"></p-column>
- <p-column field="roleLabel" header="Role"></p-column>
- <p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
- <p-column header="Edit" styleClass="action-cell">
- <ng-template pTemplate="body" let-user="rowData">
- <a [routerLink]="getRouterUserEditLink(user)" title="Edit this user">
- <span class="glyphicon glyphicon-pencil glyphicon-black"></span>
- </a>
- </ng-template>
- </p-column>
- <p-column header="Delete" styleClass="action-cell">
- <ng-template pTemplate="body" let-user="rowData">
- <span (click)="removeUser(user)" class="glyphicon glyphicon-remove glyphicon-black" title="Remove this user"></span>
- </ng-template>
- </p-column>
- </p-dataTable>
-
- <a class="add-user btn btn-success pull-right" [routerLink]="['/admin/users/add']">
- <span class="glyphicon glyphicon-plus"></span>
- Add user
- </a>
- </div>
+ <a class="add-button" routerLink="/admin/users/add">
+ <span class="icon icon-add"></span>
+ Add user
+ </a>
</div>
+
+<p-dataTable
+ [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
+ sortField="id" (onLazyLoad)="loadLazy($event)"
+>
+ <p-column field="id" header="ID" [sortable]="true" [style]="{ width: '60px' }"></p-column>
+ <p-column field="username" header="Username" [sortable]="true"></p-column>
+ <p-column field="email" header="Email"></p-column>
+ <p-column field="videoQuota" header="Video quota"></p-column>
+ <p-column field="roleLabel" header="Role"></p-column>
+ <p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
+ <p-column styleClass="action-cell">
+ <ng-template pTemplate="body" let-user="rowData">
+ <my-edit-button [routerLink]="getRouterUserEditLink(user)"></my-edit-button>
+ <my-delete-button (click)="removeUser(user)"></my-delete-button>
+ </ng-template>
+ </p-column>
+</p-dataTable>