<div id="show-users">
    <div class="search-input">
        <div class="search-icon glyphicon glyphicon-search"></div>
        <input placeholder="{{'users.placeholders.SEARCH' | translate}}" ng-model="searchText" class="col-md-2">
    </div>
    <div class="col-md-12 user-types-container" ng-repeat="(type, userTypes) in users track by type">
        <div class="col-md-12 user-type-show alert-info">
            {{type}}
        </div>
        <div class="col-md-3" ng-repeat="userInfo in userTypes | filter:searchText">
            <div class="show-users-layer">
                <h5 class="company-name-info-title">
                    <div class="info-icon glyphicon glyphicon-briefcase"></div>
                    <div class="show-users-title">
                        {{userInfo.name}}
                        <span ng-if="userInfo.isCompanyAdmin == 1">
                            (<div class="info-icon glyphicon glyphicon-wrench"></div>)
                        </span>
                    </div>
                </h5>
                <div class="users-informations-container">
                    <div class="users-data">
                        <div class="users-info">
                            <div class="info-icon glyphicon glyphicon-earphone"></div>
                            <div class="show-users-title">{{userInfo.phone}}</div>
                        </div>
                        <div class="users-info">
                            <div class="info-icon glyphicon glyphicon-envelope"></div>
                            <div class="show-users-title">{{userInfo.mail}}</div>
                        </div>
                        <div class="users-info">
                            <div class="info-icon glyphicon glyphicon-tag"></div>
                            <div class="show-users-title">{{type}}</div>
                        </div>
                        <div class="users-info">
                            <div class="info-icon glyphicon glyphicon-user"></div>
                            <div class="show-users-title">{{userInfo.username}}</div>
                        </div>
                    </div>
                    <div class="users-info-button">
                        <a href="profileSettings?subModule=editProfile&idUser={{userInfo.idUser}}">
                            <div id="edit-user-btn" class="btn btn-primary">
                                {{'users.buttons.EDIT_USER' | translate}}
                            </div>
                        </a>
                        <div id="forget-password-btn" class="btn btn-primary" ng-click="showHideDialog(userInfo)">
                            {{'users.buttons.FORGET_PASSWORD' | translate}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div><h4>Legend:</h4></div>
        <div>
            <div class="info-icon glyphicon glyphicon-wrench"></div> is company admin
        </div>
        <br/>
    </div>
</div>

<div id="generate-password-dialog-confirm"
     dialog
     ng-if="isDialogVisible"
     on-confirmation="generateTokenForUserPassword"
     on-close="showHideDialog"
     is-modal="true"
     has-buttons="true"
     parameters="userSelected"
     title="{{'users.headers.GENERATE_PASSWORD' | translate}}">
  <p><span class="glyphicon glyphicon-warning-sign"></span>{{'users.forms.messages.GENERATE_PASSWORD' | translate}}?</p>
</div>
