mirror of https://github.com/rancher/ui.git
56 lines
2.2 KiB
Handlebars
56 lines
2.2 KiB
Handlebars
<div class="row">
|
|
<div class="col-sm-12 col-md-12">
|
|
<div class="over-hr r-p10">
|
|
{{#if serviceChoices.length}}
|
|
<span>
|
|
<button class="btn-circle" {{action "addServiceLink"}}><i class="icon icon-plus-circle"/> {{t 'formServiceLinks.addAction'}}</button>
|
|
</span>
|
|
{{else}}
|
|
<span class="text-muted">{{t 'formServiceLinks.noServices'}}</span>
|
|
{{/if}}
|
|
</div>
|
|
{{#if serviceLinksArray.length}}
|
|
<table class="table fixed no-lines no-top-padding tight small">
|
|
<tr class="text-muted hidden-sm hidden-xs">
|
|
<th>{{t 'formServiceLinks.service.label'}}</th>
|
|
{{#if withAlias}}
|
|
<th width="30"> </th>
|
|
<th>{{t 'formServiceLinks.name.label'}}</th>
|
|
{{/if}}
|
|
<th width="30"> </th>
|
|
</tr>
|
|
{{#each serviceLinksArray as |link|}}
|
|
<tr class="sm-noborder">
|
|
<td data-title="{{t 'formServiceLinks.service.label'}}">
|
|
{{new-select
|
|
classNames="form-control service-link input-sm"
|
|
prompt="formServiceLinks.service.prompt"
|
|
value=link.serviceId
|
|
content=serviceChoices
|
|
optionValuePath="id"
|
|
optionLabelPath="name"
|
|
optionGroupPath="group"
|
|
}}
|
|
</td>
|
|
{{#if withAlias}}
|
|
<td class="text-center">
|
|
<p class="form-control-static"><i class="icon icon-chevron-right"></i></p>
|
|
</td>
|
|
<td data-title="{{t 'formServiceLinks.name.label'}}">
|
|
{{input class="form-control input-sm" type="text" value=link.name placeholder=(t 'formServiceLinks.name.placeholder')}}
|
|
</td>
|
|
{{/if}}
|
|
<td class="text-right">
|
|
<button class="btn btn-primary btn-sm" {{action "removeServiceLink" link}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
{{else}}
|
|
{{#if editing}}
|
|
<span class="text-center text-muted">{{t 'formServiceLinks.noLinks'}}</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|