mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2484] moved translation into the context menu action (#3092)
This commit is contained in:
@@ -247,12 +247,12 @@
|
||||
<!-- common actions -->
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.DOWNLOAD' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.DOWNLOAD"
|
||||
handler="download">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="content_copy"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.COPY' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.FOLDER.COPY"
|
||||
permission="copy"
|
||||
[disableWithNoPermission]="true"
|
||||
(error)="onContentActionError($event)"
|
||||
@@ -261,7 +261,7 @@
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="redo"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.MOVE' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.FOLDER.MOVE"
|
||||
permission="update"
|
||||
[disableWithNoPermission]="true"
|
||||
(error)="onContentActionError($event)"
|
||||
@@ -272,28 +272,28 @@
|
||||
icon="delete"
|
||||
permission="delete"
|
||||
[disableWithNoPermission]="true"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.FOLDER.DELETE"
|
||||
(permissionEvent)="handlePermissionError($event)"
|
||||
(success)="onDeleteActionSuccess($event)"
|
||||
handler="delete">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="info"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.METADATA' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.METADATA"
|
||||
(execute)="onManageMetadata($event)">
|
||||
</content-action>
|
||||
<!-- document actions -->
|
||||
<content-action
|
||||
icon="storage"
|
||||
target="document"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.VERSIONS' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.VERSIONS"
|
||||
(execute)="onManageVersions($event)">
|
||||
</content-action>
|
||||
<content-action
|
||||
*ngIf="authenticationService.isBpmLoggedIn()"
|
||||
icon="play_arrow"
|
||||
target="document"
|
||||
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.PROCESS_ACTION' | translate}}"
|
||||
title="DOCUMENT_LIST.ACTIONS.DOCUMENT.PROCESS_ACTION"
|
||||
(execute)="startProcesAction($event)">
|
||||
</content-action>
|
||||
</content-actions>
|
||||
@@ -344,7 +344,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<context-menu-holder></context-menu-holder>
|
||||
<adf-context-menu-holder></adf-context-menu-holder>
|
||||
|
||||
<div *ngIf="processId">
|
||||
<adf-start-process
|
||||
|
@@ -80,7 +80,7 @@ export class MyView {
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| title | `string` | `'Action'` | The title of the action as shown in the menu. |
|
||||
| title | `string` | `'Action'` | The title of the action as shown in the menu. If the title is a translation key the translation will be automatically showed. |
|
||||
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
|
||||
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
|
||||
| target | `string` | [ContentActionTarget.All](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/content-services/document-list/models/content-action.model.ts) | Type of item that the action applies to. Can be one of the values provided by the enum : **All**, **Folder**, **Document** |
|
||||
|
@@ -21,7 +21,9 @@ import { Component, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewChild
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
/**
|
||||
* @deprecated: context-menu-holder is deprecated, use adf-context-menu-holder instead.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'adf-context-menu-holder, context-menu-holder',
|
||||
template: `
|
||||
@@ -35,7 +37,7 @@ import { ContextMenuService } from './context-menu.service';
|
||||
<mat-icon *ngIf="showIcons && link.model?.icon">
|
||||
{{ link.model?.icon }}
|
||||
</mat-icon>
|
||||
{{link.title || link.model?.title}}
|
||||
{{ (link.title || link.model?.title) | translate}}
|
||||
</button>
|
||||
</mat-menu>
|
||||
`
|
||||
|
@@ -18,6 +18,7 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||
import { ContextMenuDirective } from './context-menu.directive';
|
||||
@@ -26,7 +27,8 @@ import { ContextMenuService } from './context-menu.service';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
],
|
||||
declarations: [
|
||||
ContextMenuHolderComponent,
|
||||
|
Reference in New Issue
Block a user