<div data-ng-include="'/themes/adminLTE/unl_data/pages/constant/header.html'" data-ng-controller="HeaderController">
</div>
<div class="wrapper">
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
   
      <!-- Content Header (Page header) -->
      <section class="content-header">
        <h1>
          User management
          <small>here you can manage unl users</small>
        </h1>
        <ol class="breadcrumb">
			<li><a href="#/main"><i class="fa fa-home"></i></a></li>
			<li><i class="fa fa-wrench"></i> Management</li>
			<li class="active"><i class="fa fa-group"></i> User management</li>
        </ol>
      </section>

    <!-- Main content -->
<section class="content row">
<!-- /.content -->
<div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">Database of users</h3>

              <div class="box-tools">
                <div class="btn-group">
                      <button type="button" class="btn btn-success btn-flat btn-sm" data-ng-click="openModal('adduser')">+Add user</button>
                      <div class="btn-group">
                        <button type="button" class="btn btn-default btn-flat btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                          More Info <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu pull-right dropdown-menu__column">
                          <li class="{{(sessionTime) ? 'active' : ''}}"><input id="check-time_id" type="checkbox" data-ng-click="sessionTime = !sessionTime" /><label class="pointer" for="check-time_id">Last session time</label>
                         </li>
                          <li class="{{(sessionIP) ? 'active' : ''}}"><input id="check-ip_id" type="checkbox" data-ng-click="sessionIP = !sessionIP"/><label for="check-ip_id" class="pointer"> Last session ip</label>
                          </li>
                          <li class="{{(currentFolder) ? 'active' : ''}}"><input id="check-folder_id" type="checkbox" data-ng-click="currentFolder = !currentFolder"><label for="check-folder_id" class="pointer"> Current folder</label>
                          </li>
                          <li class="{{(currentLab) ? 'active' : ''}}"><input id="check-lab_id" type="checkbox" data-ng-click="currentLab = !currentLab"><label for="check-lab_id" class="pointer"> Current lab</label>
                         </li>


                          <!-- <li class="{{(sessionTime) ? 'active' : ''}}"><a data-ng-click="sessionTime = !sessionTime" class="pointer">Last session time</a></li>
                          <li class="{{(sessionIP) ? 'active' : ''}}"><a data-ng-click="sessionIP = !sessionIP" class="pointer">Last session ip</a></li>
                          <li class="{{(currentFolder) ? 'active' : ''}}"><a data-ng-click="currentFolder = !currentFolder" class="pointer">Current folder</a></li>
                          <li class="{{(currentLab) ? 'active' : ''}}"><a data-ng-click="currentLab = !currentLab" class="pointer">Current lab</a></li> -->
                        </ul>
                      </div>
				</div>
              </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
              <table class="table table-hover table-striped">
                <tbody><tr>
                  <th>Username</th>
                  <th>Email</th>
                  <th>Name</th>
                  <th>Role</th>
                  <th data-ng-show="sessionTime">Last session time</th>
                  <th data-ng-show="sessionIP">Last session ip</th>
                  <th data-ng-show="currentFolder">Current folder</th>
                  <th data-ng-show="currentLab">Current lab</th>
                  <th>POD</th>
                  <th>Actions</th>
                </tr>
                <tr data-ng-repeat="(x,y) in userdata">
					<td>{{x}}</td>
					<td>{{y.email}}</td>
					<td>{{y.name}}</td>
					<td>{{y.role}}</td>
					<td data-ng-show="sessionTime">{{ (y.session  === null ) ? 'N/A' : timeConverter(y.session) }}</td>
					<td data-ng-show="sessionIP">{{ (y.ip === null) ? 'N/A' : y.ip}}</td>
					<td data-ng-show="currentFolder">{{ (y.folder  === null) ? 'N/A' : y.folder }}</td>
					<td data-ng-show="currentLab">{{ (y.lab  === null) ? 'N/A' : y.lab }}</td>
					<td>{{y.pod}}</td>
					<td>
                      <button type="button" class="btn btn-default btn-flat btn-xs" data-ng-click="openModal('edituser', y.username);"><i class="fa fa-edit"></i> Edit</button>
                      <button type="button" class="btn btn-danger btn-flat btn-xs" data-ng-click="deleteUser( y.username )"> <i class="fa fa-trash-o"></i></button>
					</td>
                </tr>
              </tbody></table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
<!-- /.content -->
</section>
  </div>
  <!-- /.content-wrapper -->
  
  
  <!-- Main Footer -->
  <!-- <div data-ng-include="'/themes/adminLTE/unl_data/pages/constant/footer.html'"> -->
</div>
<!-- ./wrapper -->
<!-- AdminLTE App -->
<link rel="stylesheet" href="/themes/adminLTE/dist/css/skins/skin-blue.min.css">
<script src="/themes/adminLTE/dist/js/app.js"></script>