working on sessions UI

parent 6a9cfc82
...@@ -36,6 +36,9 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -36,6 +36,9 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
// //
$scope.methods = []; $scope.methods = [];
// Visibility of the list of stored sessions
$scope.showSessions = false;
// Query to obtain an array of student methods // Query to obtain an array of student methods
$http $http
.get(config.backend+'/stu/'+ $scope.studentData.id +'/methods') .get(config.backend+'/stu/'+ $scope.studentData.id +'/methods')
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="row" ng-hide="!selectedIns"> <div class="row" ng-hide="!selectedIns">
<p class="session_controls"> <p class="session_controls">
<div class="col-md-4"> <div class="col-md-4">
<a ng-click="startTimer(); new_ws()" ng-disabled="!selectedIns " ng-hide="sessionRunning || studentData.num_peers<2" class="btn btn-success btn-sm" role="button" id="session_new" translate>new_session</a> <a ng-click="startTimer(); new_ws()" ng-disabled="!selectedIns " ng-hide="sessionRunning || studentData.num_peers<2" class="btn btn-success btn-sm" role="button" id="session_new" translate>new_session</a>
<a class="text_large" ng-click="pause_ws(); pauseTimer();" ng-hide="!sessionRunning || paused" id="session_pause" popover="{{ 'pause_session' | translate}}" popover-trigger="mouseenter"> <a class="text_large" ng-click="pause_ws(); pauseTimer();" ng-hide="!sessionRunning || paused" id="session_pause" popover="{{ 'pause_session' | translate}}" popover-trigger="mouseenter">
<span class="glyphicon glyphicon-pause" aria-hidden="true" title="{{ 'pause_session' | translate }}"></span> <span class="glyphicon glyphicon-pause" aria-hidden="true" title="{{ 'pause_session' | translate }}"></span>
</a> </a>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</a> </a>
</div> </div>
<div class="col-md-2" style="text-align: right"> <div class="col-md-2" style="text-align: right">
<span class="label label-success" style="font-size: 10pt">{{ 'sessions' | translate}} <span class="badge" style="font-size: 10pt">{{wsessions.length}}</span></span> <button ng-click="showSessions = !showSessions" class="btn btn-success btn-sm" style="font-size: 10pt">{{ 'sessions' | translate}} <span class="badge" style="font-size: 10pt">{{wsessions.length}}</span> <span class="glyphicon glyphicon-menu-down" ng-show="!showSessions"></span></button>
</div> </div>
</p> </p>
</div> </div>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<button class="btn btn-warning btn-sm" type="button" ng-click="close_ws()" translate>close_session</button> <button class="btn btn-warning btn-sm" type="button" ng-click="close_ws()" translate>close_session</button>
</div> </div>
<div class="list-group"> <div class="list-group" ng-show="showSessions">
<div class="list-group-item" ng-repeat="s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage"> <div class="list-group-item" ng-repeat="s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage">
<div ng-show="showLastTry && wsessions.length > 0"> <div ng-show="showLastTry && wsessions.length > 0">
<h4><strong>{{ 'last_session' | translate}}</strong>: {{ studentData.current_method }}, {{ studentData.current_instruction }}</h4> <h4><strong>{{ 'last_session' | translate}}</strong>: {{ studentData.current_method }}, {{ studentData.current_instruction }}</h4>
......
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