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

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

    <table class="table">
        <thead>
        <tr class="graybg">
            <th>{{'label.heading.name' | translate}}</th>
            <th>{{'label.heading.chargeappliesto' | translate}}</th>
            <th>{{'label.heading.ispenalty' | translate}}</th>
            <th>{{'label.heading.active' | translate}}</th>
        </tr>
        </thead>
        <tbody>
        <tr class="pointer-main" ng-repeat="charge in charges |orderBy:'name':reverse | filter:filterText">
            <td class="pointer" data-ng-click="routeTo(charge.id)">{{charge.name}}</td>
            <td class="pointer" data-ng-click="routeTo(charge.id)">{{charge.chargeAppliesTo.code | translate }}</td>
            <td class="pointer" data-ng-click="routeTo(charge.id)">{{charge.penalty}}</td>
            <td class="pointer" data-ng-click="routeTo(charge.id)">{{charge.active}}</td>
        </tr>
        </tbody>
    </table>
</div>