+
{{ icon }}
+
{{ title | translate }}
+
{{ subtitle | translate }}
+
+
diff --git a/lib/core/components/empty-content/empty-content.component.scss b/lib/core/components/empty-content/empty-content.component.scss
new file mode 100644
index 0000000000..c7204f72d8
--- /dev/null
+++ b/lib/core/components/empty-content/empty-content.component.scss
@@ -0,0 +1,33 @@
+@mixin adf-empty-content-theme($theme) {
+
+ $config: mat-typography-config();
+ $foreground: map-get($theme, foreground);
+
+ .adf-empty-content {
+ color: mat-color($foreground, text, 0.54);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ &__icon {
+ font-size: mat-font-size($config, display-3);
+ height: mat-font-size($config, display-3) !important;
+ width: mat-font-size($config, display-3) !important;
+ }
+
+ p {
+ line-height: 0;
+ }
+
+ &__title {
+ font-size: 18px;
+ font-weight: 600;
+ }
+
+ &__subtitle,
+ &__text {
+ font-size: 14px;
+ font-weight: 300;
+ }
+ }
+}
diff --git a/lib/core/components/empty-content/empty-content.component.ts b/lib/core/components/empty-content/empty-content.component.ts
new file mode 100644
index 0000000000..3667d9cda0
--- /dev/null
+++ b/lib/core/components/empty-content/empty-content.component.ts
@@ -0,0 +1,39 @@
+/*!
+ * @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, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@angular/core';
+
+@Component({
+ selector: 'adf-empty-content',
+ templateUrl: './empty-content.component.html',
+ styleUrls: ['./empty-content.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ encapsulation: ViewEncapsulation.None,
+ host: { class: 'adf-empty-content' }
+})
+export class EmptyContentComponent {
+
+ @Input()
+ icon = 'cake';
+
+ @Input()
+ title = '';
+
+ @Input()
+ subtitle = '';
+
+}
diff --git a/lib/core/core.module.ts b/lib/core/core.module.ts
index ed078e7d5c..8b3389e0e2 100644
--- a/lib/core/core.module.ts
+++ b/lib/core/core.module.ts
@@ -80,6 +80,7 @@ import { UploadService } from './services/upload.service';
import { UserPreferencesService } from './services/user-preferences.service';
import { SearchConfigurationService } from './services/search-configuration.service';
import { startupServiceFactory } from './services/startup-service-factory';
+import { EmptyContentComponent } from './components/empty-content/empty-content.component';
export function createTranslateLoader(http: HttpClient, logService: LogService) {
return new TranslateLoaderService(http, logService);
@@ -161,6 +162,9 @@ export function providers() {
}
})
],
+ declarations: [
+ EmptyContentComponent
+ ],
exports: [
ViewerModule,
SideBarActionModule,
@@ -188,7 +192,8 @@ export function providers() {
DataColumnModule,
DataTableModule,
TranslateModule,
- ButtonsMenuModule
+ ButtonsMenuModule,
+ EmptyContentComponent
]
})
export class CoreModuleLazy {
@@ -230,6 +235,9 @@ export class CoreModuleLazy {
}
})
],
+ declarations: [
+ EmptyContentComponent
+ ],
exports: [
ViewerModule,
SideBarActionModule,
@@ -257,7 +265,8 @@ export class CoreModuleLazy {
DataColumnModule,
DataTableModule,
TranslateModule,
- ButtonsMenuModule
+ ButtonsMenuModule,
+ EmptyContentComponent
],
providers: [
...providers(),
diff --git a/lib/core/datatable/components/datatable/datatable.component.html b/lib/core/datatable/components/datatable/datatable.component.html
index 7cc4b304a9..d185c16a70 100644
--- a/lib/core/datatable/components/datatable/datatable.component.html
+++ b/lib/core/datatable/components/datatable/datatable.component.html
@@ -1,7 +1,8 @@
+ [class.adf-data-table]="display === 'list'"
+ [class.adf-data-table--empty]="isEmpty()">