Files
alfresco-content-app/src/app/components/preview/preview.component.html
Denys Vuika 718a32a907 [ACA-1529] performance fixes for permission checks (#498)
* fix recent files

* fix files component

* fix shared files

* don't evaluate permissions for empty selection

* fix info drawer

* fix viewer

* fix tests

* reduce one more check

* track upload errors on app level

* remove console log

* reduce service dependencies
2018-07-08 12:25:20 +01:00

101 lines
3.8 KiB
HTML

<ng-container *ngIf="nodeId">
<ng-template #sidebarTemplate>
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.PROPERTIES' | translate">
<adf-content-metadata-card
[readOnly]="!canUpdatePreview"
[displayEmpty]="canUpdatePreview"
[preset]="'custom'"
[node]="node">
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.VERSIONS' | translate">
<ng-container>
<adf-version-manager
[showComments]="'adf-version-manager.allowComments' | adfAppConfig:true"
[allowDownload]="'adf-version-manager.allowDownload' | adfAppConfig:true"
[node]="node">
</adf-version-manager>
</ng-container>
</adf-info-drawer-tab>
</adf-info-drawer>
</ng-template>
<adf-viewer
[fileNodeId]="nodeId"
[allowNavigate]="navigateMultiple"
[allowSidebar]="true"
[sidebarTemplate]="sidebarTemplate"
[canNavigateBefore]="previousNodeId"
[canNavigateNext]="nextNodeId"
[overlayMode]="true"
(showViewerChange)="onVisibilityChanged($event)"
(navigateBefore)="onNavigateBefore()"
(navigateNext)="onNavigateNext()">
<adf-viewer-open-with *ifExperimental="'extensions'">
<button *ngFor="let entry of openWith"
mat-menu-item
(click)="runAction(entry.action)">
<mat-icon>{{ entry.icon }}</mat-icon>
<span>{{ entry.title }}</span>
</button>
</adf-viewer-open-with>
<adf-viewer-more-actions>
<button
mat-menu-item
#favorites="adfFavorite"
[adf-node-favorite]="selectedEntities">
<mat-icon color="primary" *ngIf="favorites.hasFavorites()">star</mat-icon>
<mat-icon *ngIf="!favorites.hasFavorites()">star_border</mat-icon>
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
</button>
<ng-container *ifExperimental="'share'">
<button mat-menu-item
color="primary"
[baseShareUrl]="sharedPreviewUrl$ | async"
[adf-share]="selectedEntities[0]">
<mat-icon>share</mat-icon>
<span>{{ 'APP.ACTIONS.SHARE' | translate }}</span>
</button>
</ng-container>
<button
mat-menu-item
[acaCopyNode]="selectedEntities">
<mat-icon>content_copy</mat-icon>
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
</button>
<button
mat-menu-item
*ngIf="canDeletePreview"
[acaMoveNode]="selectedEntities">
<mat-icon>library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
</button>
<button
mat-menu-item
*ngIf="canDeletePreview"
(click)="deleteFile()">
<mat-icon>delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
</button>
<button
mat-menu-item
*ngIf="canUpdatePreview"
[acaNodeVersions]="node">
<mat-icon>history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button>
</adf-viewer-more-actions>
</adf-viewer>
</ng-container>