fix no permission template (#4256)

rename correctly template demo
This commit is contained in:
Eugenio Romano
2019-02-04 21:05:07 +00:00
committed by GitHub
parent 16b6c1dcb2
commit bb770a5df9
9 changed files with 30 additions and 13 deletions

View File

@@ -0,0 +1,36 @@
<h1>Document List Demo Page</h1>
<h3>Default Loading Template</h3>
<adf-document-list currentFolderId="-my-" #defaultDocumentList>
</adf-document-list>
<h3>Custom Loading Template</h3>
<adf-document-list currentFolderId="-my-" #customLoadingDocumentList>
<adf-custom-loading-content-template>
This is a custom loading template
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</adf-custom-loading-content-template>
</adf-document-list>
<h3>Default No Permission Template</h3>
<adf-document-list currentFolderId="-my-" #defaultNoPermissionDocumentList>
</adf-document-list>
<h3>Custom No Permission Template</h3>
<adf-document-list currentFolderId="-my-" #customNoPermissionDocumentList>
<adf-custom-no-permission-template>
This is a custom no permission template<mat-icon>pan_tool</mat-icon> You shall not see the content
</adf-custom-no-permission-template>
</adf-document-list>
<h3>Default Empty Content Template</h3>
<adf-document-list #defaultEmptyDocumentList>
</adf-document-list>
<h3>Custom Empty Content Template</h3>
<adf-document-list #customEmptyDocumentList>
<adf-custom-empty-content-template>
<div>This is a custom no content template</div>
<mat-icon>cancel_presentation</mat-icon>
</adf-custom-empty-content-template>
</adf-document-list>

View File

@@ -0,0 +1,57 @@
/*!
* @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, ViewChild, AfterViewChecked } from '@angular/core';
import { DocumentListComponent } from '@alfresco/adf-content-services';
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@Component({
selector: 'app-template-list',
templateUrl: './template-demo.component.html'
})
export class TemplateDemoComponent implements AfterViewChecked {
@ViewChild('defaultDocumentList')
defaultDocumentListComponent: DocumentListComponent;
@ViewChild('customLoadingDocumentList')
customLoadingDocumentList: DocumentListComponent;
@ViewChild('customNoPermissionDocumentList')
customNoPermissionDocumentList: DocumentListComponent;
@ViewChild('defaultNoPermissionDocumentList')
defaultNoPermissionDocumentList: DocumentListComponent;
@ViewChild('customEmptyDocumentList')
customEmptyDocumentList: DocumentListComponent;
@ViewChild('defaultEmptyDocumentList')
defaultEmptyDocumentList: DocumentListComponent;
constructor() {
}
ngAfterViewChecked(): void {
this.defaultDocumentListComponent.dataTable.loading = true;
this.customLoadingDocumentList.dataTable.loading = true;
this.customEmptyDocumentList.dataTable.data = new ObjectDataTableAdapter();
this.defaultEmptyDocumentList.dataTable.data = new ObjectDataTableAdapter();
this.customNoPermissionDocumentList.dataTable.noPermission = true;
this.defaultNoPermissionDocumentList.dataTable.noPermission = true;
}
}