+
diff --git a/demo-shell/src/app/components/error/demo-error.component.scss b/demo-shell/src/app/components/error/demo-error.component.scss
new file mode 100644
index 0000000000..d5a25c914a
--- /dev/null
+++ b/demo-shell/src/app/components/error/demo-error.component.scss
@@ -0,0 +1,9 @@
+.adf-error-content {
+
+ &-buttons {
+ display: flex;
+ width: 100%;
+ justify-content: space-evenly;
+ }
+}
+
diff --git a/demo-shell/src/app/components/error/demo-error.component.ts b/demo-shell/src/app/components/error/demo-error.component.ts
new file mode 100644
index 0000000000..e152d0f9da
--- /dev/null
+++ b/demo-shell/src/app/components/error/demo-error.component.ts
@@ -0,0 +1,51 @@
+/*!
+ * @license
+ * Copyright 2019 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, OnInit } from '@angular/core';
+import { ActivatedRoute, Params, Router } from '@angular/router';
+
+@Component({
+ selector: 'app-demo-error',
+ styleUrls: ['./demo-error.component.scss'],
+ templateUrl: './demo-error.component.html'
+})
+export class DemoErrorComponent implements OnInit {
+
+ errorCode: string = '';
+
+ constructor(private route: ActivatedRoute, private router: Router) {
+ }
+
+ ngOnInit() {
+ if (this.route) {
+ this.route.params.forEach((params: Params) => {
+ if (params['id']) {
+ this.errorCode = params['id'];
+ }
+ });
+ }
+ }
+
+ onReportIssue() {
+ this.router.navigate(['/report-issue']);
+ }
+
+ onReturnButton() {
+ this.router.navigate(['/']);
+ }
+
+}
diff --git a/docs/core/components/error-content.component.md b/docs/core/components/error-content.component.md
index 79b32f4789..99cbc247e8 100644
--- a/docs/core/components/error-content.component.md
+++ b/docs/core/components/error-content.component.md
@@ -24,8 +24,6 @@ this.router.navigate(['/error', errorCode]);
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| errorCode | `string` | | Error code associated with this error. |
-| returnButtonUrl | `string` | "/" | Target URL for the return button. |
-| secondaryButtonUrl | `string` | "report-issue" | Target URL for the secondary button. |
## Details
@@ -49,6 +47,20 @@ You can customize your error messages by adding them to the translate files insi
}
```
+## How to customise the action button.
+
+The errorContentComponent allows you to customise the actions section using the selector `adf-error-content-actions`.
+
+For example you can have a custom action button with the following code
+
+```html
+
+
+
+
+
+```
+
## See also
- [Empty Content component](empty-content.component.md)
diff --git a/e2e/core/error-component.e2e.ts b/e2e/core/error-component.e2e.ts
index 6c32e6228a..9748ff413c 100644
--- a/e2e/core/error-component.e2e.ts
+++ b/e2e/core/error-component.e2e.ts
@@ -51,22 +51,6 @@ describe('Error Component', () => {
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
});
- it('[C280563] Should back home button navigate to the home page', async () => {
- await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
-
- await errorPage.clickBackButton();
-
- await expect(await browser.getCurrentUrl()).toBe(browser.params.testConfig.adf.url + '/');
- });
-
- it('[C280564] Should secondary button by default redirect to report-issue URL', async () => {
- await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/403');
-
- await errorPage.clickSecondButton();
-
- await expect(await browser.getCurrentUrl()).toBe(browser.params.testConfig.adf.url + '/report-issue');
- });
-
it('[C277304] Should display the error 404 when access to not found page', async () => {
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
await expect(await errorPage.getErrorCode()).toBe('404');
diff --git a/lib/core/templates/error-content/error-content.component.html b/lib/core/templates/error-content/error-content.component.html
index c74df59e22..765e0ecdf0 100644
--- a/lib/core/templates/error-content/error-content.component.html
+++ b/lib/core/templates/error-content/error-content.component.html
@@ -9,14 +9,5 @@