-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 404 page to handle missing contact link. Small template refactor
- Loading branch information
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
{{outlet}} | ||
<div class="row"> | ||
<div class="col"> | ||
<img src="{{this.icon}}" local-class="error-icon" alt="Error icon" /> | ||
<p local-class="error-text"><br />404: Page not found</p> | ||
<div class="col-2"> | ||
<img src="{{this.icon}}" alt="Error icon" /> | ||
</div> | ||
<div class="col my-auto"> | ||
<h2>404: Page not found</h1> | ||
<p local-class="helpful-text">Looks like the page you're looking for does not exist. If you think there is a problem | ||
with the site, please | ||
<a href="{{this.contactUrl}}">let us know</a>.</p> | ||
{{#if this.contactUrl}} | ||
<a href="{{this.contactUrl}}">let us know</a>. | ||
{{else}} | ||
contact your administrator. | ||
{{/if}} | ||
</p> | ||
</div> | ||
</div> |