#82 separate page for data table within demo app

This commit is contained in:
Denys Vuika
2016-05-18 12:55:48 +01:00
parent a73591773b
commit ca630772d0
7 changed files with 166 additions and 40 deletions

View File

@@ -0,0 +1,72 @@
<div class="p-10">
<alfresco-datatable>
<data-columns>
<data-column source="$thumbnail"></data-column>
<data-column
title="{{'DATATABLE.COLUMNS.DISPLAY_NAME' | translate}}"
source="name"
class="full-width name-column">
</data-column>
<data-column
title="{{'DATATABLE.COLUMNS.CREATED_BY' | translate}}"
source="createdByUser.displayName">
</data-column>
<data-column
title="{{'DATATABLE.COLUMNS.CREATED_ON' | translate}}"
source="createdAt">
</data-column>
</data-columns>
<data-actions>
<data-action
target="folder"
type="button"
icon="delete"
handler="system1">
</data-action>
<data-action
target="folder"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.SYSTEM_1' | translate}}"
handler="system1">
</data-action>
<data-action
target="folder"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
(execute)="myFolderAction1($event)">
</data-action>
<!-- document actions -->
<data-action
target="document"
type="button"
icon="account_circle"
handler="my-handler">
</data-action>
<data-action
target="document"
type="button"
icon="cloud_download"
handler="download">
</data-action>
<data-action
target="document"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
handler="download">
</data-action>
<data-action
target="document"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
handler="system2">
</data-action>
<data-action
target="document"
type="menu"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.CUSTOM' | translate}}"
(execute)="myCustomAction1($event)">
</data-action>
</data-actions>
</alfresco-datatable>
</div>

View File

@@ -0,0 +1,38 @@
/**
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Component} from 'angular2/core';
import {TranslatePipe} from 'ng2-translate/ng2-translate';
import {
ALFRESCO_DATATABLE_DIRECTIVES,
ALFRESCO_DATATABLE_PROVIDERS
} from 'ng2-alfresco-datatable/ng2-alfresco-datatable';
declare let __moduleName:string;
@Component({
moduleId: __moduleName,
selector: 'datatable-demo',
templateUrl: './datatable-demo.component.html',
directives: [ALFRESCO_DATATABLE_DIRECTIVES],
providers: [ALFRESCO_DATATABLE_PROVIDERS],
pipes: [TranslatePipe]
})
export class DataTableDemoComponent {
}