mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1346] Attachment list component is shown for completed tasks/processes. (#2194)
* Added ng-content to adf-empty-list compoent. * Updated css to scss. * Added 'CUSTOM_ELEMENTS_SCHEMA' to allow non-angular elements. * Updated readme.mg file
This commit is contained in:
@@ -21,7 +21,7 @@ import { ContentService, ThumbnailService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-attachment-list',
|
||||
styleUrls: ['./task-attachment-list.component.css'],
|
||||
styleUrls: ['./task-attachment-list.component.scss'],
|
||||
templateUrl: './task-attachment-list.component.html'
|
||||
})
|
||||
export class TaskAttachmentListComponent implements OnChanges {
|
||||
@@ -29,6 +29,9 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
@Input()
|
||||
taskId: string;
|
||||
|
||||
@Input()
|
||||
disabled: boolean = false;
|
||||
|
||||
@Output()
|
||||
attachmentClick = new EventEmitter();
|
||||
|
||||
@@ -38,6 +41,9 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
@Input()
|
||||
emptyListImageUrl: string = require('./../assets/images/empty_doc_lib.svg');
|
||||
|
||||
attachments: any[] = [];
|
||||
isLoading: boolean = true;
|
||||
|
||||
@@ -133,9 +139,12 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
|
||||
event.value.actions = [
|
||||
viewAction,
|
||||
removeAction,
|
||||
downloadAction
|
||||
];
|
||||
|
||||
if (!this.disabled) {
|
||||
event.value.actions.splice(1, 0, removeAction);
|
||||
}
|
||||
}
|
||||
|
||||
onExecuteRowAction(event: any) {
|
||||
@@ -175,4 +184,8 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isDisabled(): boolean {
|
||||
return this.disabled;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user