<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">
    <ul class="nav nav-tabs nav-tabs-pf">
        <li class="active"><a href="">OAuth List</a></li>
    </ul>
    <h2></h2>
    <div id="content">
        <h2><span>{{realm.realm}}</span> OAuth Clients <span tooltip-placement="right" tooltip="OAuth clients are like applicatoins, but are only granted temporary access.  In browser apps, users will be queried to explicitly grant access." class="pficon pficon-help"></span></h2>
        <table class="table table-striped table-bordered">
            <thead>
            <tr>
                <th class="kc-table-actions" colspan="3">
                    <div class="search-comp clearfix">
                        <input type="text" placeholder="Search..." class="form-control search" data-ng-model="search.name"
                               onkeyup="if(event.keyCode == 13){$(this).next('button').click();}">
                        <button type="submit" class="kc-icon-search" tooltip-placement="right"
                                tooltip="Search by application name.">
                            Icon: search
                        </button>
                    </div>
                    <div class="pull-right">
                        <a class="btn btn-primary" href="#/create/oauth-client/{{realm.realm}}">Add Client</a>
                    </div>
                </th>
            </tr>
            <tr data-ng-hide="oauthClients.length == 0">
                <th>OAuth Client Name</th>
                <th>Enabled</th>
            </tr>
            </thead>
            <!--<tfoot data-ng-show="oauthClients && oauthClients.length > 5">
            <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="client in oauthClients | filter:search">
                <td><a href="#/realms/{{realm.realm}}/oauth-clients/{{client.name}}">{{client.name}}</a></td>
                <td>{{client.enabled}}</td>
            </tr>
            <tr data-ng-show="oauthClients.length == 0">
                <td>No clients available</td>
            </tr>
            </tbody>
        </table>
        <div class="feedback warning inline" data-ng-show="search && oauthClients.length == 0">
            <p><strong>Your search returned no results.</strong><br>Try modifying the query and try again.</p>
        </div>
    </div>
</div>