Icu 10120 use hds table in users list view (#1764)
* chore: 🤖 Retire rose form textarea ✅ Closes: ICU-9425 * refactor: 💡 Added the disabled feature requested by Dharini * refactor: 💡 Rose tables to HDS tables in Users * refactor: 💡 Removed implementation of rose tables in users --------- Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
This commit is contained in:
1 parent
ff2e320267
commit
7db77c6c6d
1 file changed
+36
-36
@@ -33,42 +33,42 @@
|
||||
|
||||
{{#if @model}}
|
||||
|
||||
<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>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
{{#each @model as |user|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell>
|
||||
{{#if (can 'read model' user)}}
|
||||
<LinkTo @route='scopes.scope.users.user' @model={{user.id}}>
|
||||
{{user.displayName}}
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
{{user.displayName}}
|
||||
{{/if}}
|
||||
{{#if user.accountName}}
|
||||
<br /><Hds::Badge @text={{user.accountName}} />
|
||||
{{/if}}
|
||||
<p>{{user.description}}</p>
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<Copyable
|
||||
@text={{user.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{user.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
<Hds::Table
|
||||
class='users-list-table'
|
||||
@model={{@model}}
|
||||
@columns={{array
|
||||
(hash label=(t 'form.name.label'))
|
||||
(hash label=(t 'form.id.label'))
|
||||
}}
|
||||
@valign='middle'
|
||||
>
|
||||
<:body as |B|>
|
||||
<B.Tr>
|
||||
<B.Td>
|
||||
{{#if (can 'read user' B.data)}}
|
||||
<LinkTo @route='scopes.scope.users.user' @model={{B.data.id}}>
|
||||
{{B.data.displayName}}
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
{{B.data.displayName}}
|
||||
{{/if}}
|
||||
{{#if B.data.accountName}}
|
||||
<br /><Hds::Badge @text={{B.data.accountName}} />
|
||||
{{/if}}
|
||||
<p>{{B.data.description}}</p>
|
||||
</B.Td>
|
||||
<B.Td>
|
||||
<Copyable
|
||||
@text={{B.data.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{B.data.id}}</code>
|
||||
</Copyable>
|
||||
</B.Td>
|
||||
</B.Tr>
|
||||
</:body>
|
||||
</Hds::Table>
|
||||
|
||||
{{else}}
|
||||
|
||||
|
||||
Reference in new issue
Block a user