mirror of https://github.com/rancher/ui.git
66 lines
2.3 KiB
Handlebars
66 lines
2.3 KiB
Handlebars
{{#accordion-list-item
|
|
title=(t 'formContainerLinks.title')
|
|
detail=(t 'formContainerLinks.detail' appName=settings.appName)
|
|
status=status
|
|
statusClass=statusClass
|
|
expandAll=expandAll
|
|
expand=(action expandFn)
|
|
}}
|
|
{{#if editing}}
|
|
<button class="btn bg-link icon-btn" {{action "addLink"}}>
|
|
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
|
<span>{{t 'formContainerLinks.addActionLabel'}}</span>
|
|
</button>
|
|
|
|
<table class="table fixed no-lines no-top-padding mt-10">
|
|
<tr class="acc-label">
|
|
<th>{{t 'formContainerLinks.name.label'}}</th>
|
|
<th width="30"> </th>
|
|
<th>{{t 'formContainerLinks.alias.label'}}</th>
|
|
<th width="40"> </th>
|
|
</tr>
|
|
{{#each linksArray as |link|}}
|
|
<tr>
|
|
<td>
|
|
{{schema/input-container
|
|
value=link.name
|
|
exclude=launchConfig.id
|
|
stack=stack
|
|
}}
|
|
</td>
|
|
<td class="text-center">
|
|
<p><i class="icon icon-chevron-right"></i></p>
|
|
</td>
|
|
<td>
|
|
{{input class="form-control input-sm" type="text" value=link.alias placeholder=(t 'formContainerLinks.alias.placeholder')}}
|
|
</td>
|
|
<td class="text-right">
|
|
{{#unless link.existing}}
|
|
<button class="btn bg-primary btn-sm" {{action "removeLink" link}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button>
|
|
{{/unless}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
{{else}}
|
|
{{#sortable-table
|
|
classNames="grid sortable-table"
|
|
body=linksArray
|
|
bulkActions=false
|
|
pagingLabel="pagination.link"
|
|
headers=headers as |sortable kind row dt|}}
|
|
{{#if (eq kind "row")}}
|
|
<tr>
|
|
<td><a {{action "followLink" row.name}}>{{row.name}}</a></td>
|
|
<td>{{row.alias}}</td>
|
|
</tr>
|
|
{{else if (eq kind "nomatch")}}
|
|
<tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'formContainerLinks.noMatch'}}</td></tr>
|
|
{{else if (eq kind "norows")}}
|
|
<tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'formContainerLinks.noData'}}</td></tr>
|
|
{{/if}}
|
|
{{/sortable-table}}
|
|
{{/if}}
|
|
|
|
{{/accordion-list-item}}
|