mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
extensions: wave 2 (#497)
* introduce "create folder" action * track opened folder via store * "create folder" action, support mulitple targets * fix card view colors and toolbar layouts * basic support for permissions * simplify create menu and add permissions * add toolbar separators for extension entries * "edit folder" extension command * minor code improvements
This commit is contained in:
@@ -6,14 +6,17 @@
|
||||
(navigate)="onBreadcrumbNavigate($event)">
|
||||
</adf-breadcrumb>
|
||||
|
||||
<button *ifExperimental="'cardview'"
|
||||
mat-icon-button
|
||||
(click)="toggleGalleryView()">
|
||||
<mat-icon *ngIf="displayMode === 'list'" matTooltip="{{ 'APP.DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}">view_comfy</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'gallery'" matTooltip="{{ 'APP.DOCUMENT_LIST.TOOLBAR.LISTVIEW' | translate }}">list</mat-icon>
|
||||
</button>
|
||||
<adf-toolbar class="inline" *ngIf="!selection.isEmpty">
|
||||
<adf-toolbar class="inline">
|
||||
<button *ifExperimental="'cardview'"
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
(click)="toggleGalleryView()">
|
||||
<mat-icon *ngIf="displayMode === 'list'" matTooltip="{{ 'APP.DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}">view_comfy</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'gallery'" matTooltip="{{ 'APP.DOCUMENT_LIST.TOOLBAR.LISTVIEW' | translate }}">list</mat-icon>
|
||||
</button>
|
||||
|
||||
<ng-container *ifExperimental="'extensions'">
|
||||
<adf-toolbar-divider></adf-toolbar-divider>
|
||||
<button *ngFor="let entry of actions"
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
@@ -21,101 +24,105 @@
|
||||
(click)="runAction(entry.target.action)">
|
||||
<mat-icon>{{ entry.icon }}</mat-icon>
|
||||
</button>
|
||||
<adf-toolbar-divider></adf-toolbar-divider>
|
||||
</ng-container>
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
*ngIf="selection.file"
|
||||
title="{{ 'APP.ACTIONS.VIEW' | translate }}"
|
||||
(click)="showPreview(selection.file)">
|
||||
<mat-icon>open_in_browser</mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
title="{{ 'APP.ACTIONS.DOWNLOAD' | translate }}"
|
||||
[adfNodeDownload]="selection.nodes">
|
||||
<mat-icon>get_app</mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
*ngIf="selection.folder && permission.check(selection.folder, ['update'])"
|
||||
title="{{ 'APP.ACTIONS.EDIT' | translate }}"
|
||||
[acaEditFolder]="selection.folder">
|
||||
<mat-icon>create</mat-icon>
|
||||
</button>
|
||||
|
||||
<button mat-icon-button
|
||||
[color]="infoDrawerOpened ? 'accent' : 'primary'"
|
||||
title="{{ 'APP.ACTIONS.DETAILS' | translate }}"
|
||||
(click)="toggleSidebar()">
|
||||
<mat-icon>info_outline</mat-icon>
|
||||
</button>
|
||||
|
||||
<ng-container *ifExperimental="'share'">
|
||||
<button mat-icon-button
|
||||
<ng-container *ngIf="!selection.isEmpty">
|
||||
<button
|
||||
color="primary"
|
||||
title="{{ 'APP.ACTIONS.SHARE' | translate }}"
|
||||
mat-icon-button
|
||||
*ngIf="selection.file"
|
||||
[baseShareUrl]="sharedPreviewUrl$ | async"
|
||||
[adf-share]="selection.file">
|
||||
<mat-icon>share</mat-icon>
|
||||
title="{{ 'APP.ACTIONS.VIEW' | translate }}"
|
||||
(click)="showPreview(selection.file)">
|
||||
<mat-icon>open_in_browser</mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
title="{{ 'APP.ACTIONS.DOWNLOAD' | translate }}"
|
||||
[adfNodeDownload]="selection.nodes">
|
||||
<mat-icon>get_app</mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
*ngIf="selection.folder && permission.check(selection.folder, ['update'])"
|
||||
title="{{ 'APP.ACTIONS.EDIT' | translate }}"
|
||||
[acaEditFolder]="selection.folder">
|
||||
<mat-icon>create</mat-icon>
|
||||
</button>
|
||||
|
||||
<button mat-icon-button
|
||||
[color]="infoDrawerOpened ? 'accent' : 'primary'"
|
||||
title="{{ 'APP.ACTIONS.DETAILS' | translate }}"
|
||||
(click)="toggleSidebar()">
|
||||
<mat-icon>info_outline</mat-icon>
|
||||
</button>
|
||||
|
||||
<ng-container *ifExperimental="'share'">
|
||||
<button mat-icon-button
|
||||
color="primary"
|
||||
title="{{ 'APP.ACTIONS.SHARE' | translate }}"
|
||||
*ngIf="selection.file"
|
||||
[baseShareUrl]="sharedPreviewUrl$ | async"
|
||||
[adf-share]="selection.file">
|
||||
<mat-icon>share</mat-icon>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
title="{{ 'APP.ACTIONS.MORE' | translate }}"
|
||||
[matMenuTriggerFor]="actionsMenu">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-menu #actionsMenu="matMenu"
|
||||
[overlapTrigger]="false">
|
||||
<button
|
||||
mat-menu-item
|
||||
#favorites="adfFavorite"
|
||||
[adf-node-favorite]="selection.nodes">
|
||||
<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>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
[acaCopyNode]="selection.nodes">
|
||||
<mat-icon>content_copy</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="permission.check(selection.nodes, ['delete'])"
|
||||
[acaMoveNode]="selection.nodes">
|
||||
<mat-icon>library_books</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="permission.check(selection.nodes, ['delete'])"
|
||||
[acaDeleteNode]="selection.nodes">
|
||||
<mat-icon>delete</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="selection.file"
|
||||
[acaNodeVersions]="selection.file">
|
||||
<mat-icon>history</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
<button
|
||||
color="primary"
|
||||
mat-icon-button
|
||||
title="{{ 'APP.ACTIONS.MORE' | translate }}"
|
||||
[matMenuTriggerFor]="actionsMenu">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-menu #actionsMenu="matMenu"
|
||||
[overlapTrigger]="false">
|
||||
<button
|
||||
mat-menu-item
|
||||
#favorites="adfFavorite"
|
||||
[adf-node-favorite]="selection.nodes">
|
||||
<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>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
[acaCopyNode]="selection.nodes">
|
||||
<mat-icon>content_copy</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="permission.check(selection.nodes, ['delete'])"
|
||||
[acaMoveNode]="selection.nodes">
|
||||
<mat-icon>library_books</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="permission.check(selection.nodes, ['delete'])"
|
||||
[acaDeleteNode]="selection.nodes">
|
||||
<mat-icon>delete</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="selection.file"
|
||||
[acaNodeVersions]="selection.file">
|
||||
<mat-icon>history</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
</adf-toolbar>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user