Files
threshold-ui/ui/admin/app/components/form/group/add-members/index.hbs
T
hashicorp-copywrite[bot]andCameron Perera 3d610427d0 [COMPLIANCE] Add Copyright and License Headers (#1617)
* [COMPLIANCE] Add Copyright and License Headers

* chore: 🤖 update Copyright headers to satisfy our lint rules

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2023-03-01 09:39:41 -06:00

78 lines
2.5 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{! template-lint-disable no-whitespace-for-layout }}
{{#if this.availableUsers}}
<Rose::Form
class='full-width'
@onSubmit={{fn this.submit @submit}}
@cancel={{@cancel}}
@disabled={{@model.isSaving}}
as |form|
>
<form.actions
@submitText={{t 'resources.group.actions.add-members'}}
@cancelText={{t 'actions.cancel'}}
/>
<Rose::Table as |table|>
<table.header as |header|>
<header.row as |row|>
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
<row.headerCell>{{t 'resources.scope.title'}}</row.headerCell>
<row.headerCell>{{t 'form.description.label'}}</row.headerCell>
</header.row>
</table.header>
<table.body as |body|>
{{#each this.availableUsers as |user|}}
<body.row as |row|>
<row.headerCell>
<form.checkbox
@label={{user.displayName}}
@onChange={{fn this.toggleMember user}}
/>
{{#if user.accountName}}
{{!
The following is a formatting hack since we don't have a great
way to manage micro-whitespace or alignment among separate
components without resorting to heavy-handed grids
or contextualization. This is a one-off.
}}
<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
<Hds::Badge @text={{user.accountName}} />
{{/if}}
</row.headerCell>
<row.cell><code>{{user.id}}</code></row.cell>
<row.cell>
<ScopeBadge @scope={{user.scopeModel}} />
</row.cell>
<row.cell>{{user.description}}</row.cell>
</body.row>
{{/each}}
</table.body>
</Rose::Table>
</Rose::Form>
{{/if}}
{{#unless this.availableUsers}}
<Rose::Layout::Centered>
<Rose::Message
@title={{t 'resources.group.messages.no-members.title'}}
as |message|
>
<message.description>
{{t 'resources.group.messages.no-members.description'}}
</message.description>
<message.link @route='scopes.scope.groups.group.members'>
<Rose::Icon @name='flight-icons/svg/chevron-left-16' />
{{t 'actions.back'}}
</message.link>
</Rose::Message>
</Rose::Layout::Centered>
{{/unless}}