- thisProject Added

- Tasks tab system - Added
This commit is contained in:
Matan Bar Yosef 2015-06-24 22:43:02 +03:00
parent e2bd575ca7
commit 559d235bc9
8 changed files with 99 additions and 10 deletions

View file

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

View file

@ -0,0 +1,16 @@
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

@ -108,7 +108,6 @@ service.factory('apiService', ['$http', function($http) {
}; };
return $http(req); return $http(req);
}, },
},
getClassesByCourse: function(){ // Need to add camusName (ngRoute) ~ sagi //TODO getClassesByCourse: function(){ // Need to add camusName (ngRoute) ~ sagi //TODO
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/ClassesByCourse/" + token; var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/ClassesByCourse/" + token;
req = { req = {

View file

@ -2,11 +2,11 @@
<md-content layout-padding layout-margin> <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> My Campuses</h1>
</md-content> </md-content>
<md-card flex = "99" class="cardAllCampuses"> <md-card class="cardAllCampuses">
<div flex class = "allCampusesShow" layout = "column"> <div class = "allCampusesShow" layout = "column">
<div flex layout = "row" ng-repeat = "campus in campuses" value = "{{campus}}" layout-padding> <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;"> <a href="http://localhost:8080/home#/myClasses" style="color:black; text-decoration:none;">
<md-card layout-padding flex class = "campusCard"> <md-card layout-padding class = "campusCard">
{{campus}} {{campus}}
</md-card> </md-card>
</a> </a>

View file

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

View file

@ -1,10 +1,9 @@
<div class = "projects"> <div class = "projects">
<h1 style="margin-left:15px"><i class="fa fa-cube"></i> Projects</h1> <h1 style="margin-left:15px"><i class="fa fa-cube"></i> Projects</h1>
<md-card flex = "99" class="cardAllProjects"> <md-card flex = "99" class="cardAllProjects">
<div flex class = "allProjectsShow" layout = "column"> <div flex class = "allProjectsShow" layout = "column">
<div flex layout = "row" ng-repeat = "project in projects" value = "{{project}}" layout-padding> <div flex layout = "row" ng-repeat = "project in projects" value = "{{project}}" layout-padding>
<a href="http://localhost:8080/home#/home" style="color:black; text-decoration:none;"> <a href="http://localhost:8080/home#/thisProject" style="color:black; text-decoration:none;">
<md-card layout-padding flex class = "projectCard"> <md-card layout-padding flex class = "projectCard">
{{project}} {{project}}
</md-card> </md-card>
@ -12,8 +11,6 @@
</div> </div>
</div> </div>
</md-card> </md-card>
<md-content layout-padding layout-margin> <md-content layout-padding layout-margin>
<md-button ng-click="createProjectClicked()" ng class="md-raised md-primary">Create Project</md-button> <md-button ng-click="createProjectClicked()" ng class="md-raised md-primary">Create Project</md-button>
</md-content> </md-content>

View file

@ -1,6 +1,42 @@
<div class = "tasks"> <div class = "tasks">
<md-content layout-padding layout-margin> <md-content layout-padding layout-margin>
<h1 style="margin-left:15px"><i class="fa fa-file-text-o"></i> Tasks</h1> <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> <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>
</md-content> </md-content>
</div> </div>

View file

@ -0,0 +1,36 @@
<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>