<div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="resourceUrl + '/partials/realm-menu.html'"></div>
<div id="content-area" class="col-md-9" role="main">
    <kc-navigation-client></kc-navigation-client>
    <div id="content">
        <ol class="breadcrumb">
            <li><a href="#/realms/{{realm.realm}}/identity-provider-settings">Identity Providers</a></li>
            <li class="active"><a href="#/realms/{{realm.realm}}/identity-provider-settings/provider/{{identityProvider.providerId}}/{{identityProvider.alias}}">{{identityProvider.alias}} Provider</a></li>
            <li class="active">{{identityProvider.alias}} Mappers</li>
        </ol>
        <h2><span>{{realm.realm}} </span> {{identityProvider.alias}} Identity Provider Mappers  <span tooltip-placement="right" tooltip="Identity Provider Mappers perform transformation on tokens and documents.  They an do things like map external tokens and claims into role grants and user attributes." class="fa fa-info-circle"></span></h2>
        <table class="table table-striped table-bordered">
            <thead>
            <tr>
                <th class="kc-table-actions" colspan="4">
                    <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 mapper name.">
                            Icon: search
                        </button>
                    </div>
                    <div class="pull-right">
                        <a class="btn btn-primary" href="#/create/identity-provider-mappers/{{realm.realm}}/{{identityProvider.alias}}">Create</a>
                    </div>
                </th>
            </tr>
            <tr data-ng-hide="mappers.length == 0">
                <th>Name</th>
                <th>Category</th>
                <th>Type</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="mapper in mappers | filter:search">
                <td><a href="#/realms/{{realm.realm}}/identity-provider-mappers/{{identityProvider.alias}}/mappers/{{mapper.id}}">{{mapper.name}}</a></td>
                <td>{{mapperTypes[mapper.identityProviderMapper].category}}</td>
                <td>{{mapperTypes[mapper.identityProviderMapper].name}}</td>
            </tr>
            <tr data-ng-show="mappers.length == 0">
                <td>No mappers available</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
