mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
[ACA-1809] app header extensions (#659)
* move header to separate component * code fixes * project header buttons and menus * app menu example * delete empty style * logout action * update docs * and one more test
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
<ng-container [ngSwitch]="actionRef.type">
|
||||
<ng-container *ngSwitchCase="'default'">
|
||||
<app-toolbar-button [type]="type" [actionRef]="actionRef"></app-toolbar-button>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="'default'">
|
||||
<app-toolbar-button
|
||||
[type]="type"
|
||||
[actionRef]="actionRef"
|
||||
[color]="color">
|
||||
</app-toolbar-button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="'button'">
|
||||
<app-toolbar-button [type]="type" [actionRef]="actionRef"></app-toolbar-button>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="'button'">
|
||||
<app-toolbar-button
|
||||
[type]="type"
|
||||
[actionRef]="actionRef"
|
||||
[color]="color">
|
||||
</app-toolbar-button>
|
||||
</ng-container>
|
||||
|
||||
<adf-toolbar-divider *ngSwitchCase="'separator'" [id]="actionRef.id"></adf-toolbar-divider>
|
||||
<adf-toolbar-divider *ngSwitchCase="'separator'" [id]="actionRef.id"></adf-toolbar-divider>
|
||||
|
||||
<ng-container *ngSwitchCase="'menu'">
|
||||
<app-toolbar-menu [actionRef]="actionRef"></app-toolbar-menu>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="'menu'">
|
||||
<app-toolbar-menu
|
||||
[actionRef]="actionRef"
|
||||
[color]="color">
|
||||
</app-toolbar-menu>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="'custom'">
|
||||
<adf-dynamic-component [id]="actionRef.component"></adf-dynamic-component>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="'custom'">
|
||||
<adf-dynamic-component [id]="actionRef.component"></adf-dynamic-component>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
|
@@ -42,6 +42,9 @@ export class ToolbarActionComponent {
|
||||
@Input()
|
||||
type = 'icon-button';
|
||||
|
||||
@Input()
|
||||
color = 'primary';
|
||||
|
||||
@Input()
|
||||
actionRef: ContentActionRef;
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<button
|
||||
[id]="actionRef.id"
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
[color]="color"
|
||||
[attr.title]="(actionRef.description || actionRef.title) | translate"
|
||||
(click)="runAction()">
|
||||
<mat-icon>{{ actionRef.icon }}</mat-icon>
|
||||
|
@@ -42,6 +42,9 @@ export class ToolbarButtonComponent {
|
||||
@Input()
|
||||
type: ToolbarButtonType = ToolbarButtonType.ICON_BUTTON;
|
||||
|
||||
@Input()
|
||||
color = 'primary';
|
||||
|
||||
@Input()
|
||||
actionRef: ContentActionRef;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<button
|
||||
[id]="actionRef.id"
|
||||
color="primary"
|
||||
[color]="color"
|
||||
mat-icon-button
|
||||
[attr.title]="(actionRef.description || actionRef.title) | translate"
|
||||
[matMenuTriggerFor]="menu">
|
||||
|
@@ -36,6 +36,9 @@ export class ToolbarMenuComponent {
|
||||
@Input()
|
||||
actionRef: ContentActionRef;
|
||||
|
||||
@Input()
|
||||
color = 'primary';
|
||||
|
||||
get hasChildren(): boolean {
|
||||
return (
|
||||
this.actionRef &&
|
||||
|
Reference in New Issue
Block a user