From e64df111662a4114453d6df35bfa1b514b791b4d Mon Sep 17 00:00:00 2001 From: John Abrahams Date: Mon, 18 Dec 2023 14:43:07 -0500 Subject: [PATCH] Update 404 page to handle missing contact link. Small template refactor --- app/controllers/not-found-error.js | 5 ++--- app/templates/not-found-error.hbs | 15 +++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/controllers/not-found-error.js b/app/controllers/not-found-error.js index 5b40c31f..cf1af46d 100644 --- a/app/controllers/not-found-error.js +++ b/app/controllers/not-found-error.js @@ -1,13 +1,12 @@ /* eslint-disable ember/no-get */ import Controller from '@ember/controller'; -import { get } from '@ember/object'; export default class NotFoundErrorController extends Controller { get icon() { - return `${get(this, 'model.config.branding.error.icon')}`; + return this.model.config.branding.error?.icon; } get contactUrl() { - return `${get(this, 'model.config.branding.pages.contactUrl')}`; + return this.model.config.branding.pages?.contactUrl; } } diff --git a/app/templates/not-found-error.hbs b/app/templates/not-found-error.hbs index 5bef13a5..0175ab8f 100644 --- a/app/templates/not-found-error.hbs +++ b/app/templates/not-found-error.hbs @@ -1,10 +1,17 @@ {{outlet}}
-
- Error icon -


404: Page not found

+
+ Error icon +
+
+

404: Page not found

Looks like the page you're looking for does not exist. If you think there is a problem with the site, please - let us know.

+ {{#if this.contactUrl}} + let us know. + {{else}} + contact your administrator. + {{/if}} +

\ No newline at end of file