Files
threshold-ui/ui/admin/app/components/header-nav/index.hbs
T
Carlos Alcaide Corvo 744a732f05 refactor: 💡 Deprecate renderTemplate in header-nav (#1385)
Deprecate the usage of renderTemplate in the application header-nav
2022-10-25 11:13:19 +02:00

35 lines
917 B
Handlebars

<Rose::Dropdown
@text={{this.scope.org.displayName}}
@icon={{if
this.scope.org.isGlobal
'flight-icons/svg/globe-16'
'flight-icons/svg/org-16'
}}
as |dropdown|
>
{{#if this.session.data.authenticated.isGlobal}}
<dropdown.link @route='scopes.scope' @model='global'>
{{t 'titles.global'}}
</dropdown.link>
<dropdown.separator />
{{/if}}
{{#each this.scope.orgsList as |org|}}
<dropdown.link @route='scopes.scope' @model={{org.id}}>
{{org.displayName}}
</dropdown.link>
{{/each}}
</Rose::Dropdown>
{{#if this.scope.project}}
<Rose::Dropdown
@text={{this.scope.project.displayName}}
@icon='flight-icons/svg/grid-16'
as |dropdown|
>
{{#each this.scope.projectsList as |project|}}
<dropdown.link @route='scopes.scope' @model={{project.id}}>
{{project.displayName}}
</dropdown.link>
{{/each}}
</Rose::Dropdown>
{{/if}}