<div class="col-md-12" ng-controller="LoanProductController">
    <ul class="breadcrumb">
        <li><a href="#/products">{{'label.anchor.products' | translate}}</a></li>
        <li class="active">{{'label.anchor.loanproducts' | translate}}</li>
    </ul>

    <input ng-autofocus="true" ng-model="filterText" type="text" ng-keyup="onFilter()" class="form-control" placeholder="{{'label.input.filterbynameshortname' | translate}}">
    <a href="#/createloanproduct" class="btn btn-primary pull-right" has-permission='CREATE_LOANPRODUCT'><i class="icon-plus icon-white"></i>{{'label.button.createloanproduct' | translate}}</a>

    <table class="table">
        <thead>
        <tr class="graybg">
            <th>{{'label.heading.name' | translate}}</th>
            <th>{{'label.heading.shortname' | translate}}</th>
            <th>{{'label.heading.expirydate' | translate}}</th>
            <th>{{'label.heading.status' | translate}}</th>
        </tr>
        </thead>
        <tbody>
        <tr class="pointer-main" ng-repeat="loanproduct in loanproducts | orderBy:'name':reverse | filter:filterText">
            <td class="pointer" data-ng-click="routeTo(loanproduct.id)">{{loanproduct.name}}</td>
            <td class="pointer" data-ng-click="routeTo(loanproduct.id)">{{loanproduct.shortName}}</td>
            <td class="pointer" data-ng-click="routeTo(loanproduct.id)">{{loanproduct.closeDate | DateFormat}}</td>
            <td class="pointer" data-ng-click="routeTo(loanproduct.id)">
                <i class="icon-stop {{loanproduct.status | StatusLookup}}" tooltip="{{'label.tooltip.' + loanproduct.status | translate}}" tooltip-placement="right"></i>
            </td>
        </tr>
        </tbody>
    </table>
</div>