<div id="wrapper" class="container">
    <div class="row">
        <div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div>
        <div id="content-area" class="col-md-9" role="main">
            <div class="top-nav">
                <ul class="rcue-tabs">
                    <li><a href="#/realms/{{realm.id}}">General</a></li>
                    <li data-ng-show="realm.social"><a href="#">Social</a></li>
                    <li class="active"><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
                    <li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
                    <li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
                </ul>
            </div>
            <div id="content">
                <ol class="breadcrumb">
                    <li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
                    <li><a href="#/realms/{{realm.id}}">Settings</a></li>   
                    <li class="active">Roles</li>
                </ol>
                <h2><span>{{realm.realm}}</span> Roles</h2>
                <div class="feedback info inline" data-ng-show="!roles || roles.length == 0">
                    <p><strong>You have not configured realm roles.</strong> <a class="button" href="#/create/role/{{realm.id}}">Add Role</a></p>
                </div>
                <table>
                    <caption class="hidden" data-ng-show="roles && roles.length > 0">Table of realm roles</caption>
                    <thead>
                        <tr>
                            <th class="rcue-table-actions" colspan="2">
                                <div class="actions">
                                    <a class="button" href="#/create/role/{{realm.id}}">Add Role</a>
                                    <!-- <button class="remove disabled">Remove</button> -->
                                </div>
                            </th>
                        </tr>
                        <tr data-ng-show="roles && roles.length > 5">
                            <th class="rcue-table-actions" colspan="2">
                                <div class="search-comp clearfix">
                                    <input type="text" placeholder="Search..." class="search">
                                    <button class="icon-search" tooltip-placement="right"
                                            tooltip="Search by role name.">
                                        Icon: search
                                    </button>
                                </div>
                            </th>
                        </tr>
                        <tr>
                            <th>Role Name</th>
                            <th>Description</th>
                        </tr>
                    </thead>
                    <tfoot data-ng-show="roles && roles.length > 5"> <!-- todo -->
                    <tr>
                        <td colspan="2">
                            <div class="table-nav">
                                <a href="#" class="first disabled">First page</a><a href="#" class="prev disabled">Previous
                                page</a><span><strong>1-8</strong> of <strong>10</strong></span><a href="#"
                                                                                                   class="next">Next
                                page</a><a href="#" class="last">Last page</a>
                            </div>
                        </td>
                    </tr>
                    </tfoot>
                    <tbody>
                    <tr ng-repeat="role in roles">
                        <td><a href="#/realms/{{realm.id}}/roles/{{role.id}}">{{role.name}}</a></td>
                        <td>{{role.description}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div id="container-right-bg"></div>
    </div>
</div>
