mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
use dynamic columns from ADF (#889)
* upgrade to latest ADF 3.0.0 alpha * migrate to ADF column components * use dynamic column from ADF * fix e2e tests
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<app-page-layout>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.SEARCH_LIBRARIES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-breadcrumb root="APP.BROWSE.SEARCH_LIBRARIES.TITLE"> </adf-breadcrumb>
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
@@ -13,92 +11,119 @@
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<div class="adf-search-results">
|
||||
<div class="adf-search-results__content">
|
||||
<mat-progress-bar
|
||||
*ngIf="isLoading"
|
||||
color="primary"
|
||||
mode="indeterminate">
|
||||
</mat-progress-bar>
|
||||
<div class="adf-search-results__content-header content" *ngIf="data?.list.entries.length">
|
||||
<div class="content__side--left">
|
||||
<div class="adf-search-results--info-text"
|
||||
*ngIf="totalResults !== 1">{{ 'APP.BROWSE.SEARCH_LIBRARIES.FOUND_RESULTS' | translate: { number: totalResults } }}</div>
|
||||
<div class="adf-search-results--info-text"
|
||||
*ngIf="totalResults === 1">{{ 'APP.BROWSE.SEARCH_LIBRARIES.FOUND_ONE_RESULT' | translate: { number: totalResults } }}</div>
|
||||
</div>
|
||||
<div class="adf-search-results__content">
|
||||
<mat-progress-bar
|
||||
*ngIf="isLoading"
|
||||
color="primary"
|
||||
mode="indeterminate"
|
||||
>
|
||||
</mat-progress-bar>
|
||||
<div
|
||||
class="adf-search-results__content-header content"
|
||||
*ngIf="data?.list.entries.length"
|
||||
>
|
||||
<div class="content__side--left">
|
||||
<div
|
||||
class="adf-search-results--info-text"
|
||||
*ngIf="totalResults !== 1"
|
||||
>
|
||||
{{
|
||||
'APP.BROWSE.SEARCH_LIBRARIES.FOUND_RESULTS'
|
||||
| translate: { number: totalResults }
|
||||
}}
|
||||
</div>
|
||||
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaContextActions
|
||||
acaDocumentList
|
||||
[showHeader]="true"
|
||||
[selectionMode]="'single'"
|
||||
[sorting]="[ 'name', 'asc' ]"
|
||||
[node]="data"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)">
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<ng-container *ngIf="data">
|
||||
<div class="empty-search__block">
|
||||
<p class="empty-search__text">
|
||||
{{ 'APP.BROWSE.SEARCH.NO_RESULTS' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination *ngIf="!documentList.isEmpty()"
|
||||
acaPagination
|
||||
[target]="documentList"
|
||||
(change)="onPaginationChanged($event)">
|
||||
</adf-pagination>
|
||||
<div
|
||||
class="adf-search-results--info-text"
|
||||
*ngIf="totalResults === 1"
|
||||
>
|
||||
{{
|
||||
'APP.BROWSE.SEARCH_LIBRARIES.FOUND_ONE_RESULT'
|
||||
| translate: { number: totalResults }
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaContextActions
|
||||
acaDocumentList
|
||||
[showHeader]="true"
|
||||
[selectionMode]="'single'"
|
||||
[sorting]="['name', 'asc']"
|
||||
[node]="data"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)"
|
||||
>
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
column.template && !(column.desktopOnly && isSmallScreen)
|
||||
"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container
|
||||
*ngIf="
|
||||
!column.template && !(column.desktopOnly && isSmallScreen)
|
||||
"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<ng-container *ngIf="data">
|
||||
<div class="empty-search__block">
|
||||
<p class="empty-search__text">
|
||||
{{ 'APP.BROWSE.SEARCH.NO_RESULTS' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination
|
||||
*ngIf="!documentList.isEmpty()"
|
||||
acaPagination
|
||||
[target]="documentList"
|
||||
(change)="onPaginationChanged($event)"
|
||||
>
|
||||
</adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
|
||||
</app-page-layout>
|
||||
|
Reference in New Issue
Block a user