-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created Courses Students Passed View (#82)
- Loading branch information
1 parent
7d7a062
commit 81410ba
Showing
4 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
app/scripts/controllers/courses/CoursesStudentsPassedCtrl.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('CoursesStudentsPassedCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
var courseId = $routeParams.courseId; // For future Service calls | ||
|
||
this.course = { | ||
courseId: '72.03', | ||
name: 'Introducción a Informática', | ||
credits: 3, | ||
semester: 1, | ||
passedStudents: [ | ||
{ | ||
grade: '4', | ||
firstName: 'Matías', | ||
lastName: 'Mercado', | ||
docket: '55019' | ||
}, | ||
{ | ||
grade: '10', | ||
firstName: 'Facundo', | ||
lastName: 'Mercado', | ||
docket: '51202' | ||
}, | ||
{ | ||
grade: '9.50', | ||
firstName: 'Gibar', | ||
lastName: 'Sin', | ||
docket: '54655' | ||
}, | ||
{ | ||
grade: '8.50', | ||
firstName: 'Obi Wan', | ||
lastName: 'Kenobi', | ||
docket: '12000' | ||
}, | ||
{ | ||
grade: '10', | ||
firstName: 'Darth', | ||
lastName: 'Vader', | ||
docket: '66666' | ||
}, | ||
{ | ||
grade: '8', | ||
firstName: 'Luke', | ||
lastName: 'Skywalker', | ||
docket: '53222' | ||
}] | ||
}; | ||
|
||
this.filter = { | ||
docket: $routeParams.docket, | ||
firstName: $routeParams.firstName, | ||
lastName: $routeParams.lastName | ||
}; | ||
|
||
this.resetSearch = function() { | ||
this.filter = {}; | ||
}; | ||
}]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<div ng-controller='CoursesStudentsPassedCtrl as controller' class='courses-students-passed-container'> | ||
<!-- Page Heading --> | ||
<div class='page-header break-words'> | ||
<h1 class='inline'> | ||
<span translate='i18nCoursesPanelSection'></span> | ||
</h1> | ||
<h2 class='inline'> | ||
<span> - </span> | ||
<span> {{controller.course.name}} </span> | ||
<small> - </small> | ||
<small translate='i18nCourseApproved'></small> | ||
</h2> | ||
</div> | ||
<!-- /Page Heading --> | ||
|
||
<!-- Filter --> | ||
<div class='filter-container'> | ||
<div class='filter-fields'> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate=i18nDocket></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.docket' placeholder="{{ 'i18nDocket' | translate }}..."/> | ||
</div> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate='i18nFirstName'></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.firstName' placeholder="{{ 'i18nFirstName' | translate }}..."/> | ||
</div> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate='i18nLastName'></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.lastName' placeholder="{{ 'i18nLastName' | translate }}..."/> | ||
</div> | ||
</div> | ||
<div class='filter-buttons'> | ||
<button class='btn btn-default' type='submit'> | ||
<span class='fa fa-search' aria-hidden='true'></span> | ||
<span translate='i18nSearchButton' translate ></span> | ||
</button> | ||
<button class='btn btn-default' ng-click='controller.resetSearch()' type='submit'> | ||
<span class='fa fa-repeat' aria-hidden='true'></span> | ||
<span translate='i18nResetButton'></span> | ||
</button> | ||
</div> | ||
</div> | ||
<!-- /Filter --> | ||
|
||
<!-- Students --> | ||
<div class='table-responsive'> | ||
<table class='table table-hover'> | ||
<thead> | ||
<tr> | ||
<th translate='i18nDocket'></th> | ||
<th translate='i18nFirstName'></th> | ||
<th translate='i18nLastName'></th> | ||
<th translate='i18nGrade'></th> | ||
<th translate='i18nActions'></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-hide='controller.course.passedStudents.length > 0' class='bg-warning'> | ||
<td colspan='5' class='text-danger text-center' translate='i18nNoStudentsFound'></td> | ||
</tr> | ||
<tr ng-repeat='student in controller.course.passedStudents'> | ||
<td>{{ student.docket }}</td> | ||
<td>{{ student.firstName }}</td> | ||
<td>{{ student.lastName }}</td> | ||
<td>{{ student.grade }}</td> | ||
<td class='actions-container'> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-user' aria-hidden='true'></span> | ||
<span translate='i18nStudentShow'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /Students --> | ||
</div> |