<div class="col-md-12" ng-controller="ShareProductController">
    <ul class="breadcrumb">
        <li><a href="#/products">{{'label.anchor.products' | translate}}</a></li>
        <li class="active">{{'label.anchor.shareproducts' | 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="#/createshareproduct" class="btn btn-primary pull-right" has-permission='CREATE_SHAREPRODUCT'><i class="icon-plus icon-white"></i>{{'label.button.createshareproduct' | translate}}</a>

    <table class="table">
        <thead>
        <tr class="graybg">
            <th>{{'label.heading.name' | translate}}</th>
            <th>{{'label.heading.shortname' | translate}}</th>
            <th>{{'label.heading.totalshares' | translate}}</th>
        </tr>
        </thead>
        <tbody>
        <tr class="pointer-main" ng-repeat="shareproduct in shareproducts.currentPageItems | orderBy:'name':reverse | filter:filterText">
            <td class="pointer" data-ng-click="routeTo(shareproduct.id)">{{shareproduct.name}}</td>
            <td class="pointer" data-ng-click="routeTo(shareproduct.id)">{{shareproduct.shortName}}</td>
            <td class="pointer" data-ng-click="routeTo(shareproduct.id)">{{shareproduct.totalShares}}</td>
        </tr>
        </tbody>
    </table>

    <ul class="pager">
        <li class="previous"><a id="prev" ng-click="entries.previous()" href=""
                                ng-disabled="!entries.hasPrevious()">&larr; {{'label.button.previous' |
            translate}}</a></li>
        <li class="next"><a id="next" ng-click="entries.next()" href="" ng-disabled="!entries.hasNext()">{{'label.button.next'
            | translate}} </a></li>
    </ul>
</div>