hide Pagination in empty folder #1595 (#1811)

* hide Pagination in empty folder #1595

* unify isPaginationEnabled condition in template #1595
This commit is contained in:
Eugenio Romano
2017-04-13 12:12:27 +01:00
committed by Mario Romano
parent 09f3a6e30f
commit d4cc54d561
4 changed files with 55 additions and 28 deletions

View File

@@ -255,6 +255,14 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
return !!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
isEmpty() {
return this.data.getRows().length === 0;
}
isPaginationEnabled() {
return this.enablePagination && !this.isEmpty();
}
getNodeActions(node: MinimalNodeEntity): ContentActionModel[] {
let target = null;