Merge pull request #168 from sagidayan/UI

Ui
This commit is contained in:
Sagi Dayan 2015-08-03 23:52:25 +03:00
commit f78704ca40
4 changed files with 14 additions and 3 deletions

View file

@ -176,6 +176,9 @@ angular.module('SeHub')
console.log($scope.courseObj); console.log($scope.courseObj);
} }
$scope.getDate = function(msg){
return msg.date.day.toString() + "-" + msg.date.month.toString() +"-"+ msg.date.year.toString() + " " + msg.date.hour.toString() +":"+msg.date.minute.toString();
}
$scope.chooseProjectClicked = function() $scope.chooseProjectClicked = function()

View file

@ -24,6 +24,10 @@ angular.module('SeHub')
console.log($scope.user.id) console.log($scope.user.id)
// console.log($scope.projectid) // console.log($scope.projectid)
$scope.getDate = function(msg){
return msg.date.day.toString() + "-" + msg.date.month.toString() +"-"+ msg.date.year.toString() + " " + msg.date.hour.toString() +":"+msg.date.minute.toString();
}
$scope.displayProjectMessages = function() $scope.displayProjectMessages = function()
{ {
apiService.getAllUserMessages(token).success(function(data) apiService.getAllUserMessages(token).success(function(data)

View file

@ -70,6 +70,7 @@
<div> <div>
{{msg.group.courseName}} {{msg.group.courseName}}
{{msg.group.projectName}} {{msg.group.projectName}}
{{getDate(msg)}}
</div> </div>
</div> </div>
<div flex = "40"> <div flex = "40">
@ -83,8 +84,9 @@
<md-content class="md-padding"> <md-content class="md-padding">
<div ng-repeat = "course in unSubmittedTasks"> <div ng-repeat = "course in unSubmittedTasks">
<md-card ng-repeat = "task in course.tasks" layout-padding> <md-card ng-repeat = "task in course.tasks" layout-padding>
<div ng-repeat = "uName in task.usersToReview">
Title: {{task.title}} Title: {{task.title}}
<br/>{{(task.isPersonal) ? "A personal task": "A project task"}}
<div ng-repeat = "uName in task.usersToReview">
<br></br> <br></br>
<md-button ng-click="reviewTask(task.id, uName.id)"> <md-button ng-click="reviewTask(task.id, uName.id)">
Name: {{uName.name}} Name: {{uName.name}}
@ -158,7 +160,7 @@
<md-card ng-repeat = "msg in userMessages"> <md-card ng-repeat = "msg in userMessages">
<div layout = "row" layout-padding> <div layout = "row" layout-padding>
<div flex = "10" class="md-avatar"> <div flex = "10" class="md-avatar">
<img ng-src="{{msg.user.avatar_url}}" style="width:100%"> <img ng-src="{{msg.user.avatar_url}}" style="width:80%">
</div> </div>
<div flex = "20" layout = "column"> <div flex = "20" layout = "column">
<div> <div>
@ -167,6 +169,7 @@
<div> <div>
{{msg.group.courseName}} {{msg.group.courseName}}
{{msg.group.projectName}} {{msg.group.projectName}}
{{getDate(msg)}}
</div> </div>
</div> </div>
<div flex = "40"> <div flex = "40">

View file

@ -119,6 +119,7 @@
<div> <div>
{{msg.group.courseName}} {{msg.group.courseName}}
{{msg.group.projectName}} {{msg.group.projectName}}
{{getDate(msg)}}
</div> </div>
</div> </div>
<div flex = "40"> <div flex = "40">