Merge pull request #77 from sagidayan/UI

Ui
This commit is contained in:
Sagi Dayan 2015-06-27 15:07:46 +03:00
commit 2ddbc1719e
20 changed files with 496 additions and 309 deletions

View file

@ -151,6 +151,38 @@ body.noscroll
/*width: 100%;*/
}
/*.hvr-curl-top-left {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
position: relative;
}*/
/* Grow Rotate */
/*.campusCard {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: transform;
transition-property: transform;
}*/
.campusCard:hover, .campusCard:focus, .campusCard:active {
-webkit-transform: rotate(4deg);
transform: rotate(4deg);
}
/*.feedMessages
{
overflow: scroll;

View file

@ -66,8 +66,8 @@ app.config(['$routeProvider', '$locationProvider',
templateUrl: 'templates/views/campuses.html',
controller: 'campusesController'
})
.when('/thisProject', {
templateUrl: 'templates/views/thisProject.html',
.when('/myProjects', {
templateUrl: 'templates/views/myProjects.html',
controller: 'thisProjectController'
});
}

View file

@ -1,17 +1,70 @@
angular.module('SeHub')
.controller('campusesController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService, $rootScope) {
.controller('campusesController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService, $rootScope)
{
$scope.threeSizedArray =[];
$scope.campusesEmpty = false;
var token = $cookies['com.sehub.www'];
var init = function()
{
var i, j, counter = 0;
var newLength = 0;
if(($scope.campuses.length % 3) === 0)
{
newLength = ($scope.campuses.length / 3);
}
else
{
newLength = (Math.ceil($scope.campuses.length / 3)); // Rounds number up
}
console.log("length: " + newLength);
$scope.threeSizedArray.length = newLength;
for(j = 0; j < newLength; j++)
{
$scope.threeSizedArray[j] = [3]; // Creating array in size of 3 in each array cell
}
for(i = 0; i < newLength; i++)
{
for(j = 0; j < newLength; j++)
{
if($scope.campuses[(3*i) + j] != null)
{
$scope.threeSizedArray[i][j] = $scope.campuses[(3*i) + j];
}
}
}
console.log($scope.threeSizedArray); // TODO REMOVE
}
$scope.goToCampus = function(campusId) // Will pass you to courses by specific campus
{
$location.path('/myClasses/' + campusId.toString());
}
$scope.displayCampuses = function()
{
apiService.getCampusesByUser(token).success(function(data) // Get all the campuses
{
$scope.campuses = data;
console.log("INSIDE " + $scope.campuses);
init(); // Executing the function to initialize campuses display
}).error(function()
{
// TODO
});
if($scope.campuses != null)
{
$scope.campusesEmpty = true;
}
}
$scope.displayCampuses(); // Displaying all campuses by user
$scope.campuses = ['Bezalel', 'Ben Gurion', 'Sami Shamoon', 'Afeka', 'Ivrit', 'Kaka', 'Opium'];
console.log($scope.campuses);
// apiService.getCampusesByUser(token).success(function(data) // Get all the campuses
// {
// $scope.campuses = data;
// }).error(function() {
// // TODO
// });
}]);
}]);

View file

@ -13,7 +13,6 @@ angular.module('SeHub')
var imagePath = $scope.user.avatar_url;
//var campusName = '';
$scope.course = '';
// $scope.campusName = '';
$scope.phones = [
@ -51,8 +50,30 @@ angular.module('SeHub')
}
$scope.postMessageClicked = function() // Posting the message itself
{
if($scope.msg.msgToAdd != null)
{
jsonNewMsg = {
'courseName': 'A', // TODO Should be ===> $scope.course.courseName
'message': $scope.msg.msgToAdd
};
// console.log("J: " + jsonNewMsg.toString() + "msg: " + $scope.msg.msgToAdd);
// apiService.createMessage(token, jsonNewMsg).success(function(data)
// {
// console.log("create Msg!");
// }).error(function(err)
// {
// console.log("Error: " + err);
// });
/*
'courseName': 'Advance Math',
'message': 'The lecture today is canceled'
*/
console.log($scope.msg.msgToAdd);
$scope.messages.push({"text": $scope.msg.msgToAdd});
}

View file

@ -28,10 +28,10 @@ angular.module('SeHub')
"style": "",
"route": "/campuses"
}, {
"title": "Projects",
"title": "My Projects",
"icon": "fa fa-cube",
"style": "",
"route": "/myClasses"
"route": "/myProjects"
}, {
"title": "Tasks",
"icon": "fa fa-clipboard",

View file

@ -1,5 +1,6 @@
angular.module('SeHub')
.controller('myClassesController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
.controller('myClassesController', ['$scope', '$location', '$routeParams', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope',
function ($scope, $location, $routeParams, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
{
$scope.isStudent = false;
$scope.isCourse = false;
@ -10,7 +11,131 @@ angular.module('SeHub')
$scope.user.finalDate = '';
$scope.user.startDate = '';
$scope.showMyClass = false;
$scope.coursesEmpty = false;
var campusId = $routeParams.campusId;
var displayCourses = function()
{
apiService.getCoursesByUser(token, campusId).success(function(data) // Get all the courses for display
{
$scope.courses = data;
console.log("success " + $scope.courses);
init(); // Executing the function to initialize course display
}).error(function(err)
{
console.log("error: " + err);
});
if($scope.courses = null)
{
$scope.coursesEmpty = true;
}
}
$scope.goToClass = function(classId)
{
console.log("Done! " + $scope.courses);
$location.path('/projects/' + classId.toString()); // Will display all the projects in this course
}
$scope.chooseCourseClicked = function()
{
$scope.isCourse = true;
console.log("choose course Clicked!!");
apiService.getAllCampuses(token).success(function(data)
{
$scope.campuses = data;
console.log("Campuses: " + $scope.campuses.toString());
}).error(function(err)
{
console.log("Error: " + err);
});
}
$scope.createCourseClicked = function()
{
$scope.isNewCourse = !$scope.isNewCourse;
}
$scope.submitNewClassClicked = function()
{
if($scope.course.courseName != null && $scope.course.endDate != null && $scope.course.startDate != null)
{
var jsonNewCourse =
{
'courseName': $scope.course.courseName,
'campusName': $scope.course.campusName,
'startDate': {
'year' : $scope.course.startDate.getFullYear(),
'day' : $scope.course.startDate.getDate(),
'month': $scope.course.startDate.getMonth() + 1
},
'endDate': {
'year' : $scope.course.endDate.getFullYear(),
'day' : $scope.course.endDate.getDate(),
'month': $scope.course.endDate.getMonth() + 1
}
};
console.log("Json here: " + $scope.chosenCampus);
console.log(jsonNewCourse);
apiService.createCourse(token, jsonNewCourse).success(function(data)
{
console.log("createCourse API done");
$mdDialog.show($mdDialog.alert().title('Course Created').content('You have created course successfully.')
.ariaLabel('Email verification alert dialog').ok('Lets Start!').targetEvent())
.then(function() {
$location.path('/newCourse'); // TODO TODO TODO
}); // Pop-up alert
}).error(function(err)
{
console.log(err);
});
}
else
{
$mdDialog.show($mdDialog.alert().title('Error - Creating Course').content('Some fields are missing.')
.ariaLabel('Email verification alert dialog').ok('Try Again!').targetEvent());
}
}
var init = function()
{
var i, j, counter = 0;
var newLength = 0;
if(($scope.courses.length % 3) === 0)
{
newLength = ($scope.courses.length / 3);
}
else
{
newLength = (Math.ceil($scope.courses.length / 3)); // Rounds number up
}
console.log("length: " + newLength);
$scope.holdArrays.length = newLength;
for(j = 0; j < newLength; j++)
{
$scope.holdArrays[j] = [3]; // Creating array in size of 3 in each array cell
}
for(i = 0; i < newLength; i++)
{
for(j = 0; j < newLength; j++)
{
if($scope.courses[(3*i) + j] != null)
{
$scope.holdArrays[i][j] = $scope.courses[(3*i) + j];
}
}
}
console.log($scope.holdArrays);
}
if($scope.user.isLecturer)
{
$scope.isStudent = false;
@ -22,72 +147,7 @@ angular.module('SeHub')
console.log("Student Mode!");
}
$scope.courses = ['SE', 'PC', 'Math', 'Calculus', 'Ivrit', 'English', 'Drugs'];
// apiService.getClassesByUser(token).success(function(data) // Get all the campuses
// {
// $scope.courses = data;
// }).error(function() {
// // TODO
// });
$scope.chooseCourseClicked = function()
{
$scope.isCourse = true;
console.log("choose course Clicked!!");
}
$scope.createCourseClicked = function()
{
$scope.isNewCourse = !$scope.isNewCourse;
}
$scope.submitNewClassClicked = function()
{
if($scope.course.courseName != '' && $scope.course.endDate != '' && $scope.course.startDate != '')
{
var jsonNewCourse =
{
'courseName': $scope.course.courseName,
'campusName': $scope.course.campusName,
'startDate': {
'year' : $scope.course.startDate.getFullYear(),
'day' : $scope.course.startDate.getDate(),
'month': ($scope.course.startDate.getMonth() + 1)
},
'endDate': {
'year' : $scope.course.endDate.getFullYear(),
'day' : $scope.course.endDate.getDate(),
'month': ($scope.course.endDate.getMonth() + 1)
}
};
console.log("Json here:");
console.log(jsonNewCourse);
apiService.createCourse(token, jsonNewCourse).success(function(data)
{
console.log("createCourse API done");
}).error(function(err)
{
console.log(err);
});
$mdDialog.show($mdDialog.alert().title('Course Created').content('You have created course successfully.')
.ariaLabel('Email verification alert dialog').ok('Lets Start!').targetEvent())
.then(function() {
$window.location.href = 'templates/views/newCourse.html'; // TODO TODO TODO
}); // Pop-up alert
}
else
{
$mdDialog.show($mdDialog.alert().title('Error - Creating Course').content('You have encountered and error in creating the course.')
.ariaLabel('Email verification alert dialog').ok('Try Again!').targetEvent());
}
}
displayCourses(); // Will display the courses that the user related to // TODO!!

View file

@ -1,10 +1,9 @@
angular.module('SeHub')
.controller('newCourseController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
.controller('newCourseController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope',
function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
{
$scope.goBack = function()
{
$window.location.href = 'templates/views/myClasses.html';
$location.path('/myClasses');
}
}]);

View file

@ -1,23 +1,114 @@
angular.module('SeHub')
.controller('projectsController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
.controller('projectsController', ['$scope', '$routeParams', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $routeParams, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
{
console.log("in projects controller");
var token = $cookies['com.sehub.www'];
var classId = $routeParams.id;
$scope.projectEmpty = false;
$scope.displayProjects = function()
{
console.log("in displayProjecs!!! ");
apiService.getProjectsByCourse(token, classId).success(function(data) // Get all the campuses
{
$scope.projects = data;
init(); // Executing the function to initialize projects display
console.log("project created! not rly!! " + classId);
}).error(function(err)
{
console.log("Error: " + err);
});
if($scope.projects = null)
{
$scope.projectEmpty = true;
}
}
$scope.displayProjects(); // Displaying all projects related to user
$scope.createProjectClicked = function()
{
console.log("project created! not rly!! ");
console.log("project created! not rly!! " + classId);
// $window.location.href = 'http://localhost:8080/home#/tasks/new'; // Reference to 'newTask' page
}
$scope.projects = ['AMI', 'LULU', 'XIN Zhau', 'LUMI lu', 'Shimi', 'Azligi zligi', 'Drugs'];
// $scope.projects = ['AMI', 'LULU', 'XIN Zhau', 'LUMI lu', 'Shimi', 'Azligi zligi', 'Drugs'];
$scope.goToProject = function()
{
console.log("projects only from classID: " + classId)
$location.path('/thisProject' + classId);
}
var init = function()
{
var i, j, counter = 0;
var newLength = 0;
if(($scope.projects.length % 3) === 0)
{
newLength = ($scope.projects.length / 3);
}
else
{
newLength = (Math.ceil($scope.projects.length / 3)); // Rounds number up
}
console.log("length: " + newLength);
$scope.arrayHolder.length = newLength;
for(j = 0; j < newLength; j++)
{
$scope.arrayHolder[j] = [3]; // Creating array in size of 3 in each array cell
}
for(i = 0; i < newLength; i++)
{
for(j = 0; j < newLength; j++)
{
if($scope.projects[(3*i) + j] != null)
{
$scope.arrayHolder[i][j] = $scope.projects[(3*i) + j];
}
}
}
console.log($scope.arrayHolder);
}
/*
var jsonNewCourse =
{
'courseName': $scope.course.courseName,
'campusName': $scope.course.campusName,
'startDate': {
'year' : $scope.course.startDate.getFullYear(),
'day' : $scope.course.startDate.getDate(),
'month': $scope.course.startDate.getMonth() + 1
},
'endDate': {
'year' : $scope.course.endDate.getFullYear(),
'day' : $scope.course.endDate.getDate(),
'month': $scope.course.endDate.getMonth() + 1
}
};*/
/*
{
'projectName': 'Advance Math',
'courseName': 'JCE',
'grade': 98,
'logo_url': 'http://location.domain.com/image.jpg',
'gitRepository': 'http://location.git.com/somthing',
'membersId': ['bob', 'dylan', 'quentin', 'terentino'],
'id' : 1234567890
}
*/
// apiService.getProjectsByCourse(courseId).success(function(data) // Get all the campuses
// {
// $scope.projects = data;
// }).error(function() {
// // TODO
// });
}]);

View file

@ -90,7 +90,7 @@ angular.module('SeHub')
};
$scope.createCampus = function(ev) {
$scope.createCampusClicked = true;
$scope.createCampusClicked = !$scope.createCampusClicked;
if (!$scope.isLecturer) // "!isLecturer" Means => I Am Lecturer; if i am a lecturer (when pressing -> getting last data value before pressing)
{

View file

@ -8,7 +8,6 @@ angular.module('SeHub')
var taskName = name;
console.log("task created! " + taskName);
$location.path("/tasks/new"); // Reference to 'newTask' page
}

View file

@ -1,16 +0,0 @@
angular.module('SeHub')
.controller('thisProjectController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
{
$scope.isEditPressed = false;
$scope.editPressed = function()
{
$scope.isEditPressed = true;
console.log("EditPressed " + $scope.isEditPressed);
}
$scope.removeProject = function()
{
console.log("Project has been removed!");
}
}]);

View file

@ -44,7 +44,7 @@ service.factory('apiService', ['$http', function($http) {
return $http(req);
},
getCourseByCampusName: function(token){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAll/" + token;
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getCourseByCampusName/" + token;
req = {
method : "GET",
url : url
@ -95,7 +95,6 @@ service.factory('apiService', ['$http', function($http) {
method : "POST",
url : url,
data: payLoad
};
return $http(req);
},
@ -108,8 +107,8 @@ service.factory('apiService', ['$http', function($http) {
};
return $http(req);
},
getClassesByCourse: function(){ // Need to add camusName (ngRoute) ~ sagi //TODO
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/ClassesByCourse/" + token;
getCoursesByUser: function(token, campusId){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getCoursesByUser/" + token + "/" + campusId;
req = {
method : "GET",
url : url
@ -117,7 +116,16 @@ service.factory('apiService', ['$http', function($http) {
};
return $http(req);
},
getProjectsByCourse: function(){ // Need to add courseID (ngRoute) ~ sagi //TODO
getProjectsByCourse: function(token, classId){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getProjectByCourse/" + token + "/" + classId;
req = {
method : "GET",
url : url
};
return $http(req);
},
getProjectsByUser: function(token){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getProjectByCourse/" + token;
req = {
method : "GET",
@ -126,6 +134,7 @@ service.factory('apiService', ['$http', function($http) {
};
return $http(req);
},
getUserById: function(token, id){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/users/getUserById/" + token + "/" + id;
req = {
@ -142,7 +151,23 @@ service.factory('apiService', ['$http', function($http) {
};
return $http(req);
},
joinCourse: function(token, courseId){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/users/getUserById/" + token + "/" + courseId;
req = {
method : "PUT",
url : url
};
return $http(req);
},
createMessage: function(token, payLoad){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/create/" + token;
req = {
method : "POST",
url : url,
data: payLoad
};
return $http(req);
}
};
}]);

View file

@ -1,16 +1,22 @@
<div class = "myCampuses">
<md-content layout-padding layout-margin>
<h1 layout-margin style="margin-left:15px"><i class="fa fa-university"></i> My Campuses</h1>
<h1 layout-margin style="margin-left:15px"><i class="fa fa-university"></i> Pick A Campus</h1>
</md-content>
<md-card class="cardAllCampuses">
<div class = "allCampusesShow" layout = "column">
<div layout = "row" ng-repeat = "campus in campuses" value = "{{campus}}" layout-padding>
<a href="http://localhost:8080/home#/myClasses" style="color:black; text-decoration:none;">
<md-card layout-padding class = "campusCard">
{{campus}}
</md-card>
</a>
<md-card class="cardAllCampuses">
<div ng-if = "!scope.campusesEmpty">
<div class = "allCampusesShow" flex = "99" layout = "row" ng-repeat = "t in threeSizedArray" value = "{{t}}" layout-padding>
<div flex = "32" layout = "column" ng-repeat = "campus in t" value = "{{campus}}">
<md-button ng-click = "goToCampus(campus.id)" style="width:32%; height:32%;" flex="32" layout-padding class = "md-raised">
<!-- <img src="{{campus.avatar_url}}" style = "width:14%; height:auto;"> -->
{{campus.title}}
</md-button>
</div>
</div>
</div>
<div ng-if = "scope.campusesEmpty">>
<md-card>
You Are Not Related To Any Course, You Can Join A Course By Press 'Join'.
</md-card>
</div>
</md-card>
</div>

View file

@ -112,68 +112,6 @@
</div>
</div>
</md-content>
<md-content layout-padding layout-margin>
<h1>
<em><i class="fa fa-folder-open"></i> Project Evaluation</em>
</h1>
<md-select placeholder="Choose Project" ng-model="project" ng-click="chooseProjectClicked()" style="z-index: 300" class="projectDropDown">
</md-select>
<div layout = "column" layout-margin layout-padding>
<div layout="row">
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit" >
Press On Me
</md-card>
</a>
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
</div>
<div layout="row">
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
</div>
<div layout="row">
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
<a href="http://localhost:8080/home#/projects">
<md-card flex class = "projectExhibit">
Press On Me
</md-card>
</a>
</div>
</div>
</md-content>
</div>
<div ng-if="isStudent"> <!-- Student Mode -->
<md-content>

View file

@ -117,7 +117,7 @@
<script src="templates/js/controllers/projectsController.js"></script>
<script src="templates/js/controllers/newCourseController.js"></script>
<script src="templates/js/controllers/campusesController.js"></script>
<script src="templates/js/controllers/thisProjectController.js"></script>
<script src="templates/js/controllers/myProjectsController.js"></script>
</body>
</html>

View file

@ -2,18 +2,21 @@
<md-content layout-padding layout-margin>
<h1 layout-margin style="margin-left:15px"><i class="fa fa-graduation-cap"></i> My Classes</h1>
</md-content>
<md-card flex = "99" class="cardAllcourses">
<div flex class = "allcoursesShow" ><!-- layout = "column"> -->
<div flex layout = "row" ng-repeat = "course in courses" value = "{{course}}" layout-padding>
<a href="http://localhost:8080/home#/projects" style="color:black; text-decoration:none;">
<md-card layout-padding flex class = "campusCard">
{{course}}
<md-card class="cardAllcourses">
<div flex = "99" class = "allcoursesShow" layout = "row" ng-repeat = "t in holdArrays" value = "{{t}}">
<div flex ="32" layout = "column" ng-repeat = "course in t" value = "{{course}}" layout-padding>
<div ng-of = "!scope.coursesEmpty">
<md-card ng-click = "goToClass(course.id)" style="width:32%; height:32%;" layout-padding class = "campusCard">
{{course.id}}
</md-card>
</a>
</div>
<div ng-if = "scope.coursesEmpty">
You Are Not Related To Any Course, You May Join Any Course You Wish.
</div>
</div>
</div>
</md-card>
<!-- <md-button ng-click="joinCourseClicked()" ng class="md-raised md-primary">Join Class</md-button> -->
<div ng-if="user.isLecturer"> <!-- Lecturer Mode -->
<div layout="row">
<div layout-margin layout-padding>
@ -21,33 +24,32 @@
</div>
</div>
<div ng-if="isNewCourse">
<md-content>
<md-content layout-padding>
<md-card layout-padding>
<form name="createNewCourseForm">
<div layout layout-sm="column">
<md-input-container flex = "50">
<label>Campus name</label>
<input ng-model="course.campusName" required>
</md-input-container>
</div>
<div layout layout-sm="column">
<md-input-container style="width:80%">
<label flex = "50">Class Name</label>
<input ng-model="course.courseName" min-length="1" required>
</md-input-container>
<md-input-container flex = "20">
<label>Course Start Date</label>
<input type="date" ng-model="course.startDate" required>
</md-input-container>
<md-input-container flex = "20">
<label>Course Finish Date</label>
<input type="date" ng-model="course.endDate" required>
</md-input-container>
</div>
</form>
</md-card>
</md-content>
<md-content layout-padding>
<md-card layout-padding>
<div layout layout-sm="column">
<!-- <input ng-model="course.campusName" required> -->
<md-select placeholder = "Campus name" ng-model="course.campusName" ng-click = "chooseCourseClicked()" required>
<md-option ng-repeat="c in campuses" value="{{c.title}}">
{{c.title}}
</md-option>
</md-select>
</div>
<div layout layout-sm="column">
<md-input-container style="width:80%">
<label flex = "50">Class Name</label>
<input ng-model="course.courseName" min-length="1" required>
</md-input-container>
<md-input-container flex = "20">
<label>Course Start Date</label>
<input type="date" ng-model="course.startDate" required>
</md-input-container>
<md-input-container flex = "20">
<label>Course Finish Date</label>
<input type="date" ng-model="course.endDate" required>
</md-input-container>
</div>
</md-card>
<div layout-padding layout-margin>
<md-button ng-click="submitNewClassClicked()" class="md-raised md-primary">Submit New Class</md-button>
</div>

View file

@ -1,6 +1,6 @@
<div class = "newCourse">
<md-content layout-padding layout-margin>
<h1 layout-margin style="margin-left:15px"><i class="fa fa-graduation-cap"></i> My New Course</h1>
<h1 layout-margin style="margin-left:15px"><i class="fa fa-graduation-cap"></i> {{user.name}}'s' New Course</h1>
<md-button ng-click="goBack()" class="md-raised md-primary">Go Back</md-button>
</md-content>
</div>

View file

@ -1,13 +1,16 @@
<div class = "projects">
<h1 style="margin-left:15px"><i class="fa fa-cube"></i> Projects</h1>
<md-card flex = "99" class="cardAllProjects">
<div flex class = "allProjectsShow" layout = "column">
<div flex layout = "row" ng-repeat = "project in projects" value = "{{project}}" layout-padding>
<a href="http://localhost:8080/home#/thisProject" style="color:black; text-decoration:none;">
<md-card layout-padding flex class = "projectCard">
{{project}}
<md-card class="cardAllProjects">
<div flex ="99" class = "allProjectsShow" layout = "row" ng-repeat = "t in arrayHolder" value = "{{t}}">
<div flex = "32" layout = "column" ng-repeat = "project in t" value = "{{project}}" layout-padding>
<div ng-if = "!scope.projectEmpty">
<md-card layout-padding ng-click = "goToProject(project.id)" style="width:32%; height:32%;" class = "projectCard">
{{project.id}}
</md-card>
</a>
</div>
</div>
<div ng-if = "scope.projectEmpty">
You Are Not Related To Any Course, You May Join Any Course You Wish.
</div>
</div>
</md-card>

View file

@ -3,40 +3,50 @@
<h1 style="margin-left:15px"><i class="fa fa-file-text-o"></i> Tasks</h1>
<div ng-if="user.isLecturer">
<md-button ng-click="createTaskClicked(taskName)" ng class="md-raised md-primary">Create Task</md-button>
</div>
<div>
<!-- <md-card> -->
<md-content class="md-padding">
<md-tabs md-dynamic-height md-border-bottom>
<md-tab label="Commits">
<md-content class="md-padding">
<h1 class="md-display-2">Tab One</h1>
<p>Commits...</p>
</md-content>
</md-tab>
<md-tab label="Issues">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Two</h1>
<p>Issues...</p>
</md-content>
</md-tab>
<md-tab label="Bugs">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Three</h1>
<p> Bugs Bugs Bugs..</p>
</md-content>
</md-tab>
<md-tab label="WhatEver">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Two</h1>
<p>Bla Bla Bla..</p>
</md-content>
</md-tab>
</md-tabs>
</md-content>
<!-- </md-card> -->
</div>
<div flex>
<md-card>
<md-content class="md-padding">
<md-tabs md-dynamic-height md-border-bottom>
<md-tab label="Submitted">
<md-content class="md-padding">
<h1 class="md-display-2">Submitted</h1>
<p>Submitted...</p>
</md-content>
</md-tab>
<md-tab label="Delayed">
<md-content class="md-padding">
<h1 class="md-display-2">Delayed</h1>
<p>Delayed...</p>
</md-content>
</md-tab>
<md-tab label="Not Submitted">
<md-content class="md-padding">
<h1 class="md-display-2">Not Submitted</h1>
<p> Not Submitted ..</p>
</md-content>
</md-tab>
<md-tab label="WhatEver">
<md-content class="md-padding">
<h1 class="md-display-2">WhatEver</h1>
<p>Bla Bla Bla..</p>
</md-content>
</md-tab>
</md-tabs>
</md-content>
</md-card>
</div>
<!-- Should Be In Table List -->
<div class = "allProjectsShow" flex = "99" layout = "row" ng-repeat = "t in threeSizedArray" value = "{{t}}" layout-padding>
<div flex = "32" layout = "column" ng-repeat = "project in t" value = "{{project}}">
<md-button ng-click = "goToProject(project.id)" style="width:32%; height:32%;" flex="32" layout-padding class = "md-raised">
<!-- <img src="{{campus.avatar_url}}" style = "width:14%; height:auto;"> -->
{{project.title}}
</md-button>
</div>
</div>
<!-- Should Be In Table List -->
</div>
</md-content>
</div>

View file

@ -1,36 +0,0 @@
<div class = "thisProject">
<md-content layout-padding layout-margin>
<h1 layout-margin style="margin-left:15px"><i class="fa fa-graduation-cap"></i> {{user.name}}'s project</h1>
<div layout-padding layout-margin>
<div layout = "row" layout-padding layout-margin>
<div flex = "45">
Project Creator: {{user.name}} <!-- Should Be Project creator -->
</div>
<div flex = "45" >
<div ng-if="user.isLecturer">
<div layout = "row" layout-padding>
<div>
<md-button ng-click="editPressed()" class="md-raised md-primary">Edit</md-button>
</div>
<div ng-if="isEditPressed" style="size:inherit;">
<md-button ng-click="removeProject()" class="md-raised md-primary"><i class = "fa fa-trash-o"></i></md-button>
</div>
</div>
</div>
</div>
</div>
<div layout = "row" layout-padding layout-margin>
<div flex = "45">
<md-card>
Here Will Be Graph - Commits Over Period Of Time
</md-card>
</div>
<div flex = "45">
<md-card>
Here Will Be Graph (by columns) - Commits, Issues, Open Tasks
</md-card>
</div>
</div>
</div>
</md-content>
</div>