Icu 10178 use hds table in groups list view (#1768)
* 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 * refactor: 💡 use hds table in groups list view * refactor: 💡 Removed the group list class Dharini mentioned * refactor: 💡 Resolved the conflicts in user list table and group --------- Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
This commit is contained in:
1 parent
c8f5952e66
commit
e60d11eddd
2 files changed
+32
-37
No files matched your search
@@ -31,42 +31,38 @@
|
||||
|
||||
{{#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 |group|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell>
|
||||
{{#if (can 'read model' group)}}
|
||||
<LinkTo
|
||||
@route='scopes.scope.groups.group'
|
||||
@model={{group.id}}
|
||||
>
|
||||
{{group.displayName}}
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
{{group.displayName}}
|
||||
{{/if}}
|
||||
<p>{{group.description}}</p>
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<Copyable
|
||||
@text={{group.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{group.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
<Hds::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 group' B.data)}}
|
||||
<LinkTo @route='scopes.scope.groups.group' @model={{B.data.id}}>
|
||||
{{B.data.displayName}}
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
{{B.data.displayName}}
|
||||
{{/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}}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
{{#if @model}}
|
||||
|
||||
<Hds::Table
|
||||
class='users-list-table'
|
||||
@model={{@model}}
|
||||
@columns={{array
|
||||
(hash label=(t 'form.name.label'))
|
||||
|
||||
Reference in new issue
Block a user