<div class="content-container" ng-controller="ViewAllClientCollateralController">
    <ul class="breadcrumb">
        <li><a href="#/viewclients">{{'label.anchor.clients' | translate}}</a></li>
        <li class="active">{{'label.anchor.collaterals' | translate}}</li>
    </ul>
    
    <div class="card well">
        <div class="toolbar">
        <h4>List of Collaterals</h4>
        </div>
        <br>
        <div class="row">
            <div class="col-md-2 col-sm-3 paddedbottom20">
                <a href="#/createclientcollateral/{{clientId}}" class="btn btn-primary pull-right" has-permission='CREATE_CLIENT_COLLATERAL'><i class="fa fa-plus "></i>&nbsp;&nbsp;{{'label.button.createclientcollateral' | translate}}</a>
            </div>
        </div>
        <table class="table">
            <thead>
            <tr class="graybg">
                <th>{{'label.heading.name' | translate}}</th>
                <th>{{'label.heading.quantity' | translate}}</th>
                <th>{{'label.heading.totalValue' | translate}}</th>
                <th>{{'label.heading.totalCollateralValue' | translate}}</th>
            </tr>
            </thead>
            <tbody>
            <tr class="pointer-main" dir-paginate="collateral in collaterals | orderBy:'name':reverse |  itemsPerPage: CollateralsPerPage">
                <td class="pointer" data-ng-click="routeTo(collateral.id)">{{collateral.name | translate}}</td>
                <td class="pointer" data-ng-click="routeTo(collateral.id)">{{collateral.quantity}}</td>
                <td class="pointer" data-ng-click="routeTo(collateral.id)">{{collateral.totalValue}}</td>
                <td class="pointer" data-ng-click="routeTo(collateral.id)">{{collateral.totalCollateralValue}}</td>
            </tr>
            </tbody>
        </table>
        <dir-pagination-controls boundary-links="true" template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"></dir-pagination-controls>
    </div>
    
</div>