mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1552] extensibility support for document lists (#714)
* dynamic column component * dynamic columns for files * support conditional rendering * libraries preset * shared files preset * recent files preset * favorites preset * trashcan preset * load presets from the extension config * code fixes
This commit is contained in:
committed by
Cilibiu Bogdan
parent
933f426759
commit
9dcdacce40
@@ -37,45 +37,37 @@
|
||||
</empty-folder-content>
|
||||
|
||||
<data-columns>
|
||||
<data-column
|
||||
key="$thumbnail"
|
||||
type="image"
|
||||
[sortable]="false"
|
||||
class="image-table-cell">
|
||||
</data-column>
|
||||
<ng-container *ngFor="let column of columns">
|
||||
|
||||
<data-column
|
||||
class="adf-data-table-cell--ellipsis__name"
|
||||
key="name"
|
||||
title="APP.DOCUMENT_LIST.COLUMNS.NAME">
|
||||
<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-name-column [context]="context"></app-name-column>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<data-column
|
||||
*ngIf="!isSmallScreen"
|
||||
key="path.name"
|
||||
title="APP.DOCUMENT_LIST.COLUMNS.LOCATION">
|
||||
<ng-template let-context>
|
||||
<aca-location-link [context]="context"></aca-location-link>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
<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>
|
||||
|
||||
<data-column
|
||||
*ngIf="!isSmallScreen"
|
||||
key="content.sizeInBytes"
|
||||
type="fileSize"
|
||||
title="APP.DOCUMENT_LIST.COLUMNS.SIZE">
|
||||
</data-column>
|
||||
|
||||
<data-column
|
||||
*ngIf="!isSmallScreen"
|
||||
key="modifiedAt"
|
||||
title="APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON"
|
||||
type="date"
|
||||
format="timeAgo">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
</adf-document-list>
|
||||
|
@@ -38,6 +38,8 @@ import { AppExtensionService } from '../../extensions/extension.service';
|
||||
export class RecentFilesComponent extends PageComponent implements OnInit {
|
||||
isSmallScreen = false;
|
||||
|
||||
columns: any[] = [];
|
||||
|
||||
constructor(
|
||||
store: Store<AppStore>,
|
||||
extensions: AppExtensionService,
|
||||
@@ -61,6 +63,8 @@ export class RecentFilesComponent extends PageComponent implements OnInit {
|
||||
this.isSmallScreen = result.matches;
|
||||
})
|
||||
]);
|
||||
|
||||
this.columns = this.extensions.documentListPresets.recent || [];
|
||||
}
|
||||
|
||||
onNodeDoubleClick(node: MinimalNodeEntity) {
|
||||
|
Reference in New Issue
Block a user