<div class="">
  <h3 class="modalTitle">
    {{ alternativeTitle ? alternativeTitle : 'user_picker.title' | translate }}
  </h3>
  <div class="modalBody">
    <div style="max-height: 500px; overflow-y: auto; overflow-x: hidden;">
      <div class="row">
        <div class="col-xs-12" ng-show="!users.length">
          <div class="alert alert-danger">
            <translate>user_picker.alert</translate>
          </div>
        </div>
        <div
          class="col-xs-12"
          ng-show="users.length"
          style="margin-bottom: 5px"
        >
          <translate>common.search</translate>:
          <input type="text" ng-model="searchtext" />
        </div>
        <div class="col-xs-12" ng-show="users.length">
          <table class="table table-striped table-bordered ">
            <tr>
              <th><translate>user_picker.name</translate></th>
              <th><translate>user_picker.firstname</translate></th>
              <th><translate>user_picker.login</translate></th>
              <th><translate>user_picker.email</translate></th>
              <th class="col-xs-1"></th>
            </tr>
            <tr ng-repeat="user in users  | filter:searchtext">
              <td>
                {{user.name}}
              </td>
              <td>
                {{user.vorname}}
              </td>
              <td>
                {{user.login}}
              </td>
              <td>
                {{user.email}}
              </td>
              <td>
                <div ng-if="!type">
                  <!--      <input type="radio" name="optionsRadios" ng-value="user" ng-model="select.user">-->
                  <div
                    class="btn btn-default"
                    ng-click="select.user=user;selectUser()"
                    ng-class="{ 'btn-primary': select.user==user,'btn-default': select.user!=user }"
                  >
                    <i class="fa fa-user-plus"></i>
                  </div>
                </div>
                <div ng-if="type">
                  <input
                    type="checkbox"
                    ng-value="true"
                    ng-model="select_users[user.login]"
                  />
                </div>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </div>

    <div class="row">
      <div class="col-xs-12 text-right">
        <hr />
        <!--        <div ng-if="!type">
                    <button type="button" class="btn " ng-click="selectUser()"
                            ng-disabled="!select.user"
                            ng-class="{ 'btn-primary': select.user,
                                    'btn-default': !select.user }">
                        <translate>user_picker.select</translate>
                    </button>
                </div>-->

        <div ng-if="type=='checkbox'">
          <button
            type="button"
            class="btn "
            ng-click="partager()"
            ng-disabled="!render_select_users()"
            ng-class="{ 'btn-primary': render_select_users(),
                                    'btn-default': !render_select_users() }"
          >
            <translate>user_picker.select</translate>
          </button>
        </div>
      </div>
    </div>
  </div>
</div>
