* [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>
86 lines
2.1 KiB
Handlebars
86 lines
2.1 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: MPL-2.0
|
|
}}
|
|
|
|
<Rose::Layout::Page as |page|>
|
|
|
|
<page.breadcrumbs>
|
|
<BreadCrumbs />
|
|
</page.breadcrumbs>
|
|
|
|
<page.header>
|
|
{{#if @model.isOrg}}
|
|
<h2>
|
|
{{t 'resources.org.title'}}
|
|
<DocLink @doc='org' @iconSize='large' />
|
|
</h2>
|
|
<p>{{t 'resources.org.description'}}</p>
|
|
{{/if}}
|
|
{{#if @model.isProject}}
|
|
<h2>
|
|
{{t 'resources.project.title'}}
|
|
<DocLink @doc='project' @iconSize='large' />
|
|
</h2>
|
|
<p>{{t 'resources.project.description'}}</p>
|
|
{{/if}}
|
|
<Copyable
|
|
@text={{@model.id}}
|
|
@buttonText={{t 'actions.copy-to-clipboard'}}
|
|
@acknowledgeText={{t 'states.copied'}}
|
|
>
|
|
<code>{{@model.id}}</code>
|
|
</Copyable>
|
|
</page.header>
|
|
|
|
{{#if (can 'read model' @model)}}
|
|
<page.navigation>
|
|
<Rose::Nav::Tabs as |nav|>
|
|
<nav.link @route='scopes.scope'>
|
|
{{t 'titles.details'}}
|
|
</nav.link>
|
|
</Rose::Nav::Tabs>
|
|
</page.navigation>
|
|
{{/if}}
|
|
|
|
{{#if (can 'delete model' @model)}}
|
|
<page.actions>
|
|
<Rose::Dropdown
|
|
@text={{t 'actions.manage'}}
|
|
@dropdownRight={{true}}
|
|
as |dropdown|
|
|
>
|
|
<dropdown.button
|
|
@style='danger'
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'delete' @model)}}
|
|
>
|
|
{{#if @model.isOrg}}
|
|
{{t 'resources.org.actions.delete'}}
|
|
{{else}}
|
|
{{t 'resources.project.actions.delete'}}
|
|
{{/if}}
|
|
</dropdown.button>
|
|
</Rose::Dropdown>
|
|
</page.actions>
|
|
{{/if}}
|
|
|
|
<page.body>
|
|
{{#if (can 'read model' @model)}}
|
|
<Form::Scope
|
|
@model={{@model}}
|
|
@submit={{route-action 'save' @model}}
|
|
@cancel={{route-action 'cancel' @model}}
|
|
/>
|
|
{{else}}
|
|
<Rose::Layout::Centered>
|
|
<Rose::Message as |message|>
|
|
<message.description>
|
|
{{t 'resources.scope.messages.cannot_read'}}
|
|
</message.description>
|
|
</Rose::Message>
|
|
</Rose::Layout::Centered>
|
|
{{/if}}
|
|
</page.body>
|
|
|
|
</Rose::Layout::Page> |