<div class="content-container">
    <ul class="breadcrumb">
        <li><a href="#/system">{{'label.anchor.system' | translate}}</a></li>
        <li class="active">{{'label.anchor.viewroles' | translate}}</li>
    </ul>
	<div class="card" data-ng-controller="RoleController">
		<div class="content">
	    	<div class="toolbar"></div>
	    	<br>
	    	<div class="row">
		        <div class="col-md-6">
		            <input ng-autofocus="true" ng-model="filterText" type="text" ng-keyup="onFilter()" class="form-control" placeholder="{{'label.input.filterbyname' | translate}}">
		        </div>
		        <div class="col-md-6">
		            <a href="#/admin/addrole" class="btn btn-primary pull-right" has-permission='CREATE_ROLE'><i class="fa fa-plus "></i> {{'label.button.addrole' | translate}}</a>
		        </div>
		    </div>
		    <hr/>
		    <table class="table">
		        <thead>
		        <tr class="graybg">
		            <th>{{'label.heading.name' | translate}}</th>
		            <th>{{'label.heading.description' | translate}}</th>
					<th>{{'label.heading.status' | translate}}</th>
		        </tr>
		        </thead>
		        <tbody>
		        <tr class="pointer-main" dir-paginate="role in roles | orderBy:'name':reverse | filter:filterText | itemsPerPage: RolesPerPage">
		            <td class="pointer" data-ng-click="routeTo(role.id)">{{role.name}}</td>
		            <td class="pointer" data-ng-click="routeTo(role.id)">{{role.description}}</td>
					<td class="pointer" data-ng-click="routeTo(role.id)">
						<div ng-if="!isRoleEnable(role.disabled)">{{'label.heading.enabledrole' | translate }}</div>
						<div ng-if="isRoleEnable(role.disabled)">{{'label.heading.disabled' | translate }}</div>
					</td>
		        </tr>
		        </tbody>
		    </table>
	    </div>
        <dir-pagination-controls boundary-links="true" template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"></dir-pagination-controls>
	</div>
</div>
