supervisor list: student list v1

parent d7a7770f
...@@ -12,7 +12,6 @@ dashboardControllers.controller('SupervisorsCtrl', function SupervisorsCtrl($sco ...@@ -12,7 +12,6 @@ dashboardControllers.controller('SupervisorsCtrl', function SupervisorsCtrl($sco
// Add to list // Add to list
$scope.office = data[0]; $scope.office = data[0];
$scope.supervisors_list(); $scope.supervisors_list();
console.log($scope.office.id);
}) })
.error(function(data, status, headers, config) { .error(function(data, status, headers, config) {
console.log("Error from API: " + data.error); console.log("Error from API: " + data.error);
...@@ -24,6 +23,7 @@ dashboardControllers.controller('SupervisorsCtrl', function SupervisorsCtrl($sco ...@@ -24,6 +23,7 @@ dashboardControllers.controller('SupervisorsCtrl', function SupervisorsCtrl($sco
.get(config.backend+'/office/get/' + $scope.office.id + '/supervisors') .get(config.backend+'/office/get/' + $scope.office.id + '/supervisors')
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
$scope.supervisors_list = data; $scope.supervisors_list = data;
console.log($scope.supervisors_list);
}) })
.error(function(data, status, headers, config) { .error(function(data, status, headers, config) {
$translate('error_downloading_supervisors').then(function (translation) { $translate('error_downloading_supervisors').then(function (translation) {
......
<!-- Supervisors --> <!-- Supervisors -->
<div class="panel panel-default">
<div class="row">
<h3 translate>supervisors</h3>
</div>
<div class="row">
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<div class="col-xs-4 input-group"> <div class="row">
<div class="col-xs-4">
<h5 translate>supervisors</h5>
</div>
<div class="col-xs-4">
</div>
<div class="col-xs-4">
<div class=" input-group">
<input type="text" ng-model="search_sups" id="search_sups" placeholder="{{ 'filter' | translate }}" class="form-control" aria-describedby="basic-addon2"> <input type="text" ng-model="search_sups" id="search_sups" placeholder="{{ 'filter' | translate }}" class="form-control" aria-describedby="basic-addon2">
<span class="input-group-addon glyphicon glyphicon-search" id="basic-addon2" aria-hidden="true"></span> <span class="input-group-addon glyphicon glyphicon-search" id="basic-addon2" aria-hidden="true"></span>
</div> </div>
</div> </div>
</div>
</div>
<table class="table"> <div class="table-responsive">
<table class="table table-hover">
<thead class="thead-default"> <thead class="thead-default">
<tr> <tr>
<th translate>name</th> <th translate>name</th>
<th translate>email</th> <th translate>email</th>
<th translate>options</th> <th translate>students</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="supervisor in supervisors_list | filter:search_sups | orderBy: 'name'"> <tr ng-repeat="supervisor in supervisors_list | filter:search_sups | orderBy: 'name'">
<td class="color_blue">{{supervisor.name}} {{supervisor.surname}}</td> <td class="color_blue">{{supervisor.name}} {{supervisor.surname}}</td>
<td>{{supervisor.email}}</td> <td>{{supervisor.email}}</td>
<td class="ops"></td> <td>
<table>
<tr ng-repeat="student in supervisor.students" >
<td>{{ student.name }} {{ student.surname }}</td>
</tr> </tr>
</tbody>
</table> </table>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment