diff --git a/changelog/12895.txt b/changelog/12895.txt new file mode 100644 index 000000000..ff9a66e61 --- /dev/null +++ b/changelog/12895.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Standardizes toolbar presentation of destructive actions +``` \ No newline at end of file diff --git a/ui/app/templates/components/alphabet-edit.hbs b/ui/app/templates/components/alphabet-edit.hbs index 0928343c9..918962e44 100644 --- a/ui/app/templates/components/alphabet-edit.hbs +++ b/ui/app/templates/components/alphabet-edit.hbs @@ -33,6 +33,7 @@ > Delete alphabet +
{{/if}} {{#if capabilities.canUpdate }} {{#if @model.canDelete}} - - Delete role - -
+ + Delete role + +
{{/if}} {{#if @model.canGenerateCredentials}} - + {{/if}} {{#if @model.canEditRole}} - - Edit role - + + Edit role + {{/if}} diff --git a/ui/app/templates/components/generated-item.hbs b/ui/app/templates/components/generated-item.hbs index 990fe4e3b..10c8ed7aa 100644 --- a/ui/app/templates/components/generated-item.hbs +++ b/ui/app/templates/components/generated-item.hbs @@ -32,14 +32,21 @@ {{#if (eq mode "show")}} - + Delete {{itemType}} - +
+ Edit {{singularize itemType}} diff --git a/ui/app/templates/components/role-aws-edit.hbs b/ui/app/templates/components/role-aws-edit.hbs index 2a3d429b7..e6799c893 100644 --- a/ui/app/templates/components/role-aws-edit.hbs +++ b/ui/app/templates/components/role-aws-edit.hbs @@ -18,6 +18,15 @@ {{#if (eq mode "show")}} + {{#if model.canDelete}} + + Delete role + +
+ {{/if}} {{#if model.canGenerate}} {{/if}} - {{#if (and model.canGenerate (or model.canDelete model.canEdit))}} -
- {{/if}} - {{#if model.canDelete}} - - Delete role - - {{/if}} {{#if model.canEdit}} + {{#if model.canDelete}} + + Delete role + +
+ {{/if}} {{#if model.canGenerate}} {{/if}} - {{#if (and (or model.canGenerate model.canSign) (or model.canDelete model.canEdit))}} -
- {{/if}} - {{#if model.canDelete}} - - Delete role - - {{/if}} {{#if model.canEdit}} + {{#if model.canDelete}} + + Delete role + +
+ {{/if}} {{#if (eq model.keyType "otp")}} {{/if}} - {{#if (or model.canUpdate model.canDelete)}} -
- {{/if}} - {{#if model.canDelete}} - - Delete role - - {{/if}} {{#if (or model.canUpdate model.canDelete)}} Delete +
{{/if}} {{else}} {{#if (and this.canUndeleteVersion @modelForData.deleted)}} @@ -26,7 +27,7 @@ +
{{/if}} {{#if capabilities.canUpdate }} - {{#if (or capabilities.canUpdate capabilities.canDelete)}} -
- {{/if}} {{#if capabilities.canDelete}} {{#if (gt model.allowed_roles.length 0)}} {{/if}} +
{{/if}} {{#if capabilities.canUpdate }} {{#if (gt model.allowed_roles.length 0)}} diff --git a/ui/app/templates/vault/cluster/policy/edit.hbs b/ui/app/templates/vault/cluster/policy/edit.hbs index 11c823ca4..736794144 100644 --- a/ui/app/templates/vault/cluster/policy/edit.hbs +++ b/ui/app/templates/vault/cluster/policy/edit.hbs @@ -23,13 +23,6 @@ {{#if (and (not-eq model.id "root") (or capabilities.canUpdate capabilities.canDelete))}} - - Back to policy - -
{{#if (and (not-eq model.id "default") capabilities.canDelete)}} Delete +
{{/if}} + + Back to policy + {{/if}} diff --git a/ui/lib/kmip/addon/templates/credentials/show.hbs b/ui/lib/kmip/addon/templates/credentials/show.hbs index e30079a02..8a1b5018c 100644 --- a/ui/lib/kmip/addon/templates/credentials/show.hbs +++ b/ui/lib/kmip/addon/templates/credentials/show.hbs @@ -10,12 +10,6 @@ - - Back to role - {{#if model.deletePath.canDelete}} +
{{/if}} + + Back to role + +
{{/if}} {{#if model.updatePath.canUpdate}}