{{settings.appName}}
{{page-header-environment
pageScope=pageScope
}}
{{#each navTree as |item|}}
{{#if item.submenu.length}}
{{! Has a submenu }}
-
{{#if (or (not item.resource) (rbac-allows resource=item.resource scope=item.resourceScope))}}
{{#if item.route}}
{{#link-to-as-attrs
item.route
models=item.ctx
qp=item.qp
onlyCurrentWhen=item.onlyCurrentWhen
activeParent=true
class="dropdown-toggle"
role="button"
aria-haspopup="true"
aria-expanded="false"
}}
{{maybe-t item.localizedLabel item.label}}
{{/link-to-as-attrs}}
{{else}}
{{maybe-t item.localizedLabel item.label}}
{{/if}}
{{/if}}
{{else if item.route}}
{{#if (or (not item.resource) (rbac-allows resource=item.resource scope=item.resourceScope))}}
{{! No submenu }}
-
{{#link-to-as-attrs
item.route
models=item.ctx
qp=item.qp
activeParent=true
onlyCurrentWhen=item.onlyCurrentWhen
class="nav-link"
}}
{{maybe-t item.localizedLabel item.label}}
{{/link-to-as-attrs}}
{{/if}}
{{else}}
{{! Just a label }}
{{/if}}
{{/each}}