diff --git a/app/guid-node/links/controller.ts b/app/guid-node/links/controller.ts index ffb123a27c..c6d8469294 100644 --- a/app/guid-node/links/controller.ts +++ b/app/guid-node/links/controller.ts @@ -5,4 +5,8 @@ export default class GuidNodeLinksController extends Controller { get currentUserCanEdit() { return this.model.node.currentUserPermissions.includes(Permission.Write); } + + get shouldShowEmptyPage() { + return this.model.configuredLinkAddons.every((item: { targetUrl: string | null }) => item.targetUrl === null); + } } diff --git a/app/guid-node/links/template.hbs b/app/guid-node/links/template.hbs index bfacda06ee..86da9ebb2f 100644 --- a/app/guid-node/links/template.hbs +++ b/app/guid-node/links/template.hbs @@ -1,6 +1,11 @@
{{t 'links.empty-screen-message'}}
+ {{#if this.currentUserCanEdit}} +{{t 'links.point-to-addons-message'}} {{t 'addons.heading'}}
+ {{/if}} + {{else}}
- |
- {{configuredLinkAddon.displayName}} | -{{configuredLinkAddon.resourceType}} | -{{t 'links.link'}} | -
+ |
+ {{configuredLinkAddon.displayName}} | +{{configuredLinkAddon.resourceType}} | +{{t 'links.link'}} | +
{{t 'links.empty-screen-message'}}
- {{#if this.currentUserCanEdit}} -{{t 'links.point-to-addons-message'}} {{t 'addons.heading'}}
- {{/if}} {{/if}}