[ACA-1226] Node info panel (#241)

* node metadata

* getNodeInfo over nodeInfo
This commit is contained in:
Cilibiu Bogdan
2018-03-19 13:16:20 +02:00
committed by Denys Vuika
parent 50d6147e81
commit 086d22b92d
20 changed files with 708 additions and 396 deletions

View File

@@ -21,6 +21,13 @@
<mat-icon>get_app</mat-icon>
</button>
<button mat-icon-button
[color]="infoDrawerOpened ? 'primary' : 'accent'"
*ngIf="documentList.selection.length"
(click)="toggleSidebar()">
<mat-icon>info_outline</mat-icon>
</button>
<button
mat-icon-button
*ngIf="hasSelection(documentList.selection)"
@@ -68,74 +75,88 @@
</div>
<div class="inner-layout__content">
<div class="inner-layout__panel">
<adf-document-list #documentList
[attr.class]="documentList.isEmpty() ? 'empty-list' : ''"
currentFolderId="-recent-"
selectionMode="multiple"
[navigate]="false"
[sorting]="sorting"
[contextMenuActions]="true"
[contentActions]="false"
[imageResolver]="imageResolver"
(sorting-changed)="onSortingChanged($event)"
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"
(node-select)="onNodeSelect($event, documentList)">
<adf-document-list #documentList
[attr.class]="documentList.isEmpty() ? 'empty-list' : ''"
currentFolderId="-recent-"
selectionMode="multiple"
[navigate]="false"
[sorting]="sorting"
[contextMenuActions]="true"
[contentActions]="false"
[imageResolver]="imageResolver"
(sorting-changed)="onSortingChanged($event)"
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"
(node-select)="onNodeSelect($event, documentList)">
<empty-folder-content>
<ng-template>
<app-empty-folder
icon="access_time"
title="APP.BROWSE.RECENT.EMPTY_STATE.TITLE"
subtitle="APP.BROWSE.RECENT.EMPTY_STATE.TEXT">
</app-empty-folder>
</ng-template>
</empty-folder-content>
<data-columns>
<data-column
key="$thumbnail"
type="image"
[sortable]="false"
class="image-table-cell">
</data-column>
<data-column
class="adf-data-table-cell--ellipsis__name"
key="name"
title="APP.DOCUMENT_LIST.COLUMNS.NAME">
<ng-template let-value="value" let-context>
<span class="adf-datatable-cell" title="{{ context?.row?.obj | adfNodeNameTooltip }}">{{ value }}</span>
<empty-folder-content>
<ng-template>
<app-empty-folder
icon="access_time"
title="APP.BROWSE.RECENT.EMPTY_STATE.TITLE"
subtitle="APP.BROWSE.RECENT.EMPTY_STATE.TEXT">
</app-empty-folder>
</ng-template>
</data-column>
</empty-folder-content>
<data-column
key="path"
title="APP.DOCUMENT_LIST.COLUMNS.LOCATION">
<ng-template let-context>
<app-location-link [context]="context"></app-location-link>
</ng-template>
</data-column>
<data-columns>
<data-column
key="$thumbnail"
type="image"
[sortable]="false"
class="image-table-cell">
</data-column>
<data-column
key="content.sizeInBytes"
type="fileSize"
title="APP.DOCUMENT_LIST.COLUMNS.SIZE">
</data-column>
<data-column
class="adf-data-table-cell--ellipsis__name"
key="name"
title="APP.DOCUMENT_LIST.COLUMNS.NAME">
<ng-template let-value="value" let-context>
<span class="adf-datatable-cell" title="{{ context?.row?.obj | adfNodeNameTooltip }}">{{ value }}</span>
</ng-template>
</data-column>
<data-column
key="modifiedAt"
title="APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON">
<ng-template let-value="value">
<span title="{{ value | date:'medium' }}">{{ value | adfTimeAgo }}</span>
</ng-template>
</data-column>
</data-columns>
<data-column
key="path"
title="APP.DOCUMENT_LIST.COLUMNS.LOCATION">
<ng-template let-context>
<app-location-link [context]="context"></app-location-link>
</ng-template>
</data-column>
</adf-document-list>
<adf-pagination [ngClass]="{'no-border' : documentList.isEmpty()}"
[target]="documentList"
(changePageSize)="onChangePageSize($event)">
</adf-pagination>
<data-column
key="content.sizeInBytes"
type="fileSize"
title="APP.DOCUMENT_LIST.COLUMNS.SIZE">
</data-column>
<data-column
key="modifiedAt"
title="APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON">
<ng-template let-value="value">
<span title="{{ value | date:'medium' }}">{{ value | adfTimeAgo }}</span>
</ng-template>
</data-column>
</data-columns>
</adf-document-list>
<adf-pagination [ngClass]="{'no-border' : documentList.isEmpty()}"
[target]="documentList"
(changePageSize)="onChangePageSize($event)">
</adf-pagination>
</div>
<div class="inner-layout__side-panel"
*ngIf="infoDrawerOpened"
[app-node-info]="documentList.selection"
(changed)="toggleSidebar($event)"
#infoInstance=nodeInfo>
<adf-info-drawer title="Details">
<adf-info-drawer-tab label="Properties">
<adf-content-metadata-card [node]="infoInstance.node"></adf-content-metadata-card>
</adf-info-drawer-tab>
</adf-info-drawer>
</div>
</div>
</div>

View File

@@ -41,6 +41,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatMenuModule, MatSnackBarModule, MatIconModule } from '@angular/material';
import { DocumentListService } from '@alfresco/adf-content-services';
import { ContentManagementService } from '../../common/services/content-management.service';
import { NodeInfoDirective } from '../../common/directives/node-info.directive';
import { RecentFilesComponent } from './recent-files.component';
@@ -80,6 +81,7 @@ describe('RecentFiles Routed Component', () => {
TimeAgoPipe,
NodeNameTooltipPipe,
NodeFavoriteDirective,
NodeInfoDirective,
DocumentListComponent,
RecentFilesComponent
],