mirror of https://github.com/rancher/ui.git
145 lines
4.3 KiB
Handlebars
145 lines
4.3 KiB
Handlebars
{{#if showHeader}}
|
|
<div class="fixed-header-actions row clearfix pb-20">
|
|
{{#if internalBulkActions}}
|
|
<div class="bulk-actions pull-left">
|
|
{{#each availableActions as |resourceAction index|}}
|
|
{{#if resourceAction.enabled}}
|
|
<a class="btn bg-primary" href="#" onclick={{action "executeBulkAction" resourceAction.action}}
|
|
tabindex={{index}}>
|
|
<i class="{{resourceAction.icon}}"></i>
|
|
{{t resourceAction.label}}
|
|
</a>
|
|
{{else}}
|
|
<a class="btn bg-default btn-disabled" href="#" onclick="return false;" tabindex={{index}}>
|
|
<i class="{{resourceAction.icon}}"></i>
|
|
{{t resourceAction.label}}
|
|
</a>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{#if selectedNodes}}
|
|
<div class="inline-block text-small">{{t pagingLabel pages=1 count=selectedNodes.length}}</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="pull-left">
|
|
{{#if leftActions}}
|
|
<div class="vertical-middle pr-20">
|
|
{{yield this "left-actions"}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="pull-right">
|
|
{{#if search}}
|
|
<div class="vertical-middle">
|
|
{{#ember-wormhole to=searchToWormhole renderInPlace=(not searchToWormhole)}}
|
|
<div class="{{unless searchToWormhole " pull-right"}} search-group input-group">
|
|
{{input value=searchText aria-title=(t "generic.search") type="search" class="input-sm pull-right" placeholder=(t "generic.search")}}
|
|
{{#if searchText}}
|
|
<span class="input-group-btn">
|
|
<button class="search-close-btn btn bg-transparent text-info pl-10 pr-10" type="button" {{action "clearSearch" }}><i
|
|
class="icon icon-close" /></button>
|
|
</span>
|
|
{{/if}}
|
|
</div>
|
|
{{/ember-wormhole}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if rightActions}}
|
|
<div class="vertical-middle pl-20">
|
|
{{yield this "right-actions"}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<table class="grid sortable-table {{if internalBulkActions " has-actions"}} {{if groupByKey "bordered" }} {{if
|
|
subRows "has-sub-rows bordered" }} {{tableClassNames}}">
|
|
<thead>
|
|
<tr class="fixed-header-placeholder">
|
|
{{#if internalBulkActions}}
|
|
<th width="{{checkWidth}}"></th>
|
|
{{/if}}
|
|
{{#each headers as |header idx|}}
|
|
<th width={{if header.width header.width}} class="{{header.classNames}}"></th>
|
|
{{/each}}
|
|
{{#if rowActions}}
|
|
<th width="{{actionsWidth}}"></th>
|
|
{{/if}}
|
|
</tr>
|
|
|
|
|
|
<tr class="fixed-header">
|
|
{{#if internalBulkActions}}
|
|
<th width="{{checkWidth}}" class="row-check">
|
|
{{check-box classNames="select-all-check" checked=isAll}}
|
|
</th>
|
|
{{/if}}
|
|
{{#each headers as |header|}}
|
|
{{sortable-thead
|
|
sortable=this
|
|
current=sortBy
|
|
descending=descending
|
|
action=(action "changeSort")
|
|
header=header
|
|
}}
|
|
{{/each}}
|
|
{{#if rowActions}}
|
|
<th width="{{actionsWidth}}"></th>
|
|
{{/if}}
|
|
</tr>
|
|
</thead>
|
|
{{#if prefix}}
|
|
<tbody>
|
|
{{yield this "prefix"}}
|
|
</tbody>
|
|
{{/if}}
|
|
|
|
{{#if groupByKey}}
|
|
{{#if extraGroups.length}}
|
|
{{#each extraGroups as |group|}}
|
|
<tbody class="group">
|
|
{{yield this "group" group}}
|
|
{{yield this "norows"}}
|
|
</tbody>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{#each groupedContent as |group|}}
|
|
<tbody class="group">
|
|
{{yield this "group" group}}
|
|
{{#each group.items as |row|}}
|
|
{{yield this "row" row dt (array-includes childFilterNodes row.id)}}
|
|
{{/each}}
|
|
</tbody>
|
|
{{else}}
|
|
{{yield this (if arranged.length "nomatch" "norows")}}
|
|
{{/each}}
|
|
{{else}}
|
|
<tbody>
|
|
{{#each pagedContent as |row|}}
|
|
{{yield this "row" row dt (array-includes childFilterNodes row.id)}}
|
|
{{else}}
|
|
{{yield this (if arranged.length "nomatch" "norows")}}
|
|
{{/each}}
|
|
</tbody>
|
|
{{/if}}
|
|
|
|
{{#if suffix}}
|
|
{{yield this "suffix"}}
|
|
{{/if}}
|
|
</table>
|
|
|
|
{{#if (and paging showPaging)}}
|
|
{{page-numbers
|
|
content=pagedContent
|
|
class="text-center mt-10 mb-10 no-select"
|
|
indexTo=indexTo
|
|
indexFrom=indexFrom
|
|
totalCount=filtered.length
|
|
textLabel=pagingLabel
|
|
}}
|
|
{{/if}}
|