#9 added i18n demo (demo shell)

This commit is contained in:
Denys Vuika
2016-05-10 14:25:23 +01:00
parent c51e680f79
commit 7d3eec5776
3 changed files with 92 additions and 20 deletions

View File

@@ -2,23 +2,73 @@
<alfresco-document-list>
<content-columns>
<content-column source="$thumbnail"></content-column>
<content-column title="Display Name" source="displayName" class="full-width name-column"></content-column>
<content-column title="Created By" source="createdBy"></content-column>
<content-column title="Created On" source="createdOn"></content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
source="displayName"
class="full-width name-column">
</content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
source="createdBy">
</content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}"
source="createdOn">
</content-column>
</content-columns>
<content-actions>
<!-- folder actions -->
<content-action target="folder" type="button" icon="delete" title="Delete" handler="system1"></content-action>
<content-action target="folder" type="menu" title="Default folder action 1" handler="system1"></content-action>
<content-action target="folder" type="menu" title="Custom folder action" (execute)="myFolderAction1($event)"></content-action>
<content-action
target="folder"
type="button"
icon="delete"
handler="system1">
</content-action>
<content-action
target="folder"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.SYSTEM_1' | translate}}"
handler="system1">
</content-action>
<content-action
target="folder"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
(execute)="myFolderAction1($event)">
</content-action>
<!-- document actions -->
<content-action target="document" type="button" icon="account_circle" handler="my-handler"></content-action>
<content-action target="document" type="button" icon="cloud_download" handler="download"></content-action>
<content-action target="document" type="menu" title="Download" handler="download"></content-action>
<content-action target="document" type="menu" title="System action" handler="system2"></content-action>
<content-action target="document" type="menu" title="Custom action" (execute)="myCustomAction1($event)"></content-action>
<content-action
target="document"
type="button"
icon="account_circle"
handler="my-handler">
</content-action>
<content-action
target="document"
type="button"
icon="cloud_download"
handler="download">
</content-action>
<content-action
target="document"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
handler="download">
</content-action>
<content-action
target="document"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
handler="system2">
</content-action>
<content-action
target="document"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.CUSTOM' | translate}}"
(execute)="myCustomAction1($event)">
</content-action>
</content-actions>
</alfresco-document-list>
</alfresco-upload-drag-area>

View File

@@ -23,6 +23,7 @@ import {
} from 'ng2-alfresco-documentlist/ng2-alfresco-documentlist';
import {MDL} from 'ng2-alfresco-core/material';
import {ALFRESCO_ULPOAD_COMPONENT} from 'ng2-alfresco-upload/ng2-alfresco-upload';
import {TranslatePipe} from 'ng2-translate/ng2-translate';
declare let __moduleName:string;
@@ -31,7 +32,8 @@ declare let __moduleName:string;
selector: 'files-component',
templateUrl: './files.component.html',
directives: [DOCUMENT_LIST_DIRECTIVES, MDL, ALFRESCO_ULPOAD_COMPONENT],
providers: [DOCUMENT_LIST_PROVIDERS]
providers: [DOCUMENT_LIST_PROVIDERS],
pipes: [TranslatePipe]
})
export class FilesComponent {
breadcrumb: boolean = false;

View File

@@ -1,9 +1,29 @@
{
"title" : "Welcome",
"login" : "Login",
"username" : "Username",
"input-required-message": "Required",
"input-min-message": "Your username needs to be at least 4 characters.",
"login-button": "Login",
"login-error-message": "You have entered an invalid username or password"
"title": "Welcome",
"login": "Login",
"username": "Username",
"input-required-message": "Required",
"input-min-message": "Your username needs to be at least 4 characters.",
"login-button": "Login",
"login-error-message": "You have entered an invalid username or password",
"DOCUMENT_LIST": {
"COLUMNS": {
"DISPLAY_NAME": "Display name",
"CREATED_BY": "Created by",
"CREATED_ON": "Created on"
},
"ACTIONS": {
"FOLDER": {
"SYSTEM_1": "System folder action 1",
"CUSTOM": "Custom folder action"
},
"DOCUMENT": {
"DOWNLOAD": "Download",
"SYSTEM_2": "System document action 2",
"CUSTOM": "Custom action"
}
}
}
}