chore: 🤖 implement remove sources abilities on targets

This commit is contained in:
Randall Morey committed 2021-09-27 16:55:19 -04:00
1 parent add826007d
commit 3ecb8b8ea9
6 files changed
+97 -37

No files matched your search

@@ -43,26 +43,28 @@
</Copyable>
</row.cell>
<row.cell>
<Rose::Dropdown
@icon='flight-icons/svg/more-horizontal-16'
@iconOnly={{true}}
@showCaret={{false}}
@dropdownRight={{true}}
@text={{t 'actions.manage'}}
as |dropdown|
>
<dropdown.button
@style='danger'
{{on
'click'
(route-action
'removeCredentialSource' @model credentialLibrary
)
}}
{{#if (can 'removeCredentialSources target' @model)}}
<Rose::Dropdown
@icon='flight-icons/svg/more-horizontal-16'
@iconOnly={{true}}
@showCaret={{false}}
@dropdownRight={{true}}
@text={{t 'actions.manage'}}
as |dropdown|
>
{{t 'actions.remove'}}
</dropdown.button>
</Rose::Dropdown>
<dropdown.button
@style='danger'
{{on
'click'
(route-action
'removeCredentialSource' @model credentialLibrary
)
}}
>
{{t 'actions.remove'}}
</dropdown.button>
</Rose::Dropdown>
{{/if}}
</row.cell>
</body.row>
{{/each}}
@@ -33,24 +33,26 @@
</Copyable>
</row.cell>
<row.cell>
<Rose::Dropdown
@icon='flight-icons/svg/more-horizontal-16'
@iconOnly={{true}}
@showCaret={{false}}
@dropdownRight={{true}}
@text='{{t 'actions.manage'}}'
as |dropdown|
>
<dropdown.button
@style='danger'
{{on
'click'
(route-action 'removeHostSource' @model hostSet.model)
}}
{{#if (can 'removeHostSources target' @model)}}
<Rose::Dropdown
@icon='flight-icons/svg/more-horizontal-16'
@iconOnly={{true}}
@showCaret={{false}}
@dropdownRight={{true}}
@text='{{t 'actions.manage'}}'
as |dropdown|
>
{{t 'actions.remove'}}
</dropdown.button>
</Rose::Dropdown>
<dropdown.button
@style='danger'
{{on
'click'
(route-action 'removeHostSource' @model hostSet.model)
}}
>
{{t 'actions.remove'}}
</dropdown.button>
</Rose::Dropdown>
{{/if}}
</row.cell>
</body.row>
{{/each}}