Files
threshold-ui/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs
T

82 lines
2.4 KiB
Handlebars

<Rose::Layout::Page as |page|>
<page.header>
<h2>
{{t "resources.auth-method.title_plural"}}
<DocLink @doc="auth-method" @iconSize="large" />
</h2>
<p>{{t "resources.auth-method.description"}}</p>
</page.header>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.actions>
{{#if @model}}
<Rose::LinkButton @route="scopes.scope.auth-methods.new" @style="primary">
{{t "titles.new"}}
</Rose::LinkButton>
{{/if}}
</page.actions>
<page.body>
{{#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.type.label'}}</row.headerCell>
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
</header.row>
</table.header>
<table.body as |body|>
{{#each @model as |authMethod|}}
<body.row as |row|>
<row.headerCell>
<LinkTo
@route="scopes.scope.auth-methods.auth-method"
@model={{authMethod.id}}
>
{{authMethod.displayName}}
</LinkTo>
<p>{{authMethod.description}}</p>
</row.headerCell>
<row.cell>
<Rose::Badge>
{{t (concat 'resources.auth-method.types.' authMethod.type)}}
</Rose::Badge>
</row.cell>
<row.cell>
<Copyable
@text={{authMethod.id}}
@buttonText={{t "actions.copy-to-clipboard"}}
@acknowledgeText={{t "states.copied"}}
>
<code>{{authMethod.id}}</code>
</Copyable>
</row.cell>
</body.row>
{{/each}}
</table.body>
</Rose::Table>
{{else}}
<Rose::Layout::Centered>
<Rose::Message @title={{t 'resources.auth-method.messages.welcome.title'}} as |message|>
<message.description>
{{t 'resources.auth-method.messages.welcome.description'}}
</message.description>
<message.link @route="scopes.scope.auth-methods.new">
<Rose::Icon @name="plus-circle-outline" />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
</Rose::Layout::Centered>
{{/if}}
</page.body>
</Rose::Layout::Page>