group-based-policy-ui/gbpui/static/dashboard/gbpui/transfer-table-bridge/transfer-table-bridge.html

115 lines
4.5 KiB
HTML

<transfer-table tr-model="tableData" limits="tableLimits" help-text="tableHelpText">
<allocated ng-model="tableData.allocated.length">
<table st-table="tableData.displayedAllocated"
st-safe-src="tableData.allocated"
hz-table
class="table table-striped table-rsp table-detail table-condensed">
<thead>
<tr ng-if="allocatedFilter">
<th colspan="2">
<hz-magic-search-bar filter-facets="facets"></hz-magic-search-bar>
</th>
</tr>
<tr>
<th colspan="2">Name</th>
</tr>
</thead>
<tbody>
<tr ng-if="tableData.allocated.length === 0">
<td colspan="{{ addItemLink ? 2 : 1 }}">
<div class="no-rows-help">
{$ ::tableHelpText.noAllocText $}
</div>
</td>
</tr>
<tr ng-repeat="row in tableData.displayedAllocated track by row.id">
<td>
{$ row.name $}
</td>
<td class="actions_column">
<action-list>
<button tabIndex="0"
ng-class="'btn btn-default'"
ng-click="trCtrl.deallocate(row)"
type="button">
<span class="fa fa-arrow-down"></span>
</button>
</action-list>
</td>
</tr>
</tbody>
</table>
</allocated>
<available>
<table
st-table="tableData.displayedAvailable"
st-safe-src="tableData.available"
hz-table
class="table table-striped table-rsp table-detail table-condensed">
<thead>
<tr>
<th colspan="{$ addItemLink ? 1 : 2 $}">
<hz-magic-search-bar filter-facets="facets"></hz-magic-search-bar>
</th>
<th ng-if="addItemLink">
<span class="input-group-btn">
<a href="{$ addItemLink $}" data-add-to-field="{$ id $}_select" class="btn btn-default ajax-add ajax-modal">
<span class="fa fa-plus"></span>
</a>
</span>
</th>
</tr>
<tr>
<th colspan="2">Name</th>
</tr>
</thead>
<tbody>
<tr ng-if="trCtrl.numAvailable() === 0">
<td colspan="{{ addItemLink ? 2 : 1 }}">
<div class="no-rows-help">
{$ ::tableHelpText.noAvailText $}
</div>
</td>
</tr>
<tr ng-repeat="row in tableData.displayedAvailable track by row.id"
ng-if="!trCtrl.allocatedIds[row.id]"
>
<td>{$ row.name $}</td>
<td class="actions_column">
<action-list button-tooltip="row.warningMessage"
bt-model="ctrl.tooltipModel"
bt-disabled="!row.disabled"
warning-classes="'invalid'">
<notifications>
<span class="fa fa-exclamation-circle invalid"
ng-show="row.disabled"></span>
</notifications>
<button tabIndex="0"
ng-class="'btn btn-default'"
ng-click="trCtrl.allocate(row)"
type="button">
<span class="fa fa-arrow-up"></span>
</button>
</action-list>
</td>
</tr>
</tbody>
</table>
<div style="display:None">
<select
d-select
id="{$ id $}_select"
data-add-item-url
multiple
name="{$ name $}" >
</select>
</div>
</available>
</transfer-table>