<div class="col-md-12" ng-controller="TemplateController">
    <ul class="breadcrumb">
        <li class="active">{{'label.anchor.templates' | translate}}</li>
    </ul>

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

    <table class="table">
        <thead>
        <tr class="graybg">
            <th>{{ 'label.heading.entity' | translate }}</th>
            <th>{{ 'label.heading.type' | translate }}</th>
            <th>{{ 'label.heading.name' | translate }}</th>
        </tr>
        </thead>
        <tbody>
        <tr class="pointer-main" ng-repeat="template in templates | filter:filterText">
            <td class="pointer" data-ng-click="routeTo(template.id)">{{template.entity}}</td>
            <td class="pointer" data-ng-click="routeTo(template.id)">{{template.type}}</td>
            <td class="pointer" data-ng-click="routeTo(template.id)">{{template.name}}</td>
        </tr>
        </tbody>
    </table>
</div>