-
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 Students Inscriptions View (#85)
- Loading branch information
1 parent
d09d70e
commit d2a9d8a
Showing
6 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
app/scripts/controllers/students/StudentsInscriptionsCtrl.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,51 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('StudentsInscriptionsCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
var docket = $routeParams.docket; // For future Service calls | ||
|
||
this.student = { | ||
docket: '55019', | ||
firstName: 'Matías', | ||
lastName: 'Mercado', | ||
email: 'mmercado@itba.edu.ar', | ||
genre: 'Masculino', | ||
dni: '38917403', | ||
birthday: '1995-05-04', | ||
address: { | ||
country: 'Argentina', | ||
city: 'Buenos Aires', | ||
neighborhood: 'Almagro', | ||
number: '682', | ||
street: 'Corrientes', | ||
floor: '2', | ||
door: 'A', | ||
telephone: '1544683390', | ||
zipCode: '1100' | ||
}, | ||
availableCourses: [ | ||
{ | ||
courseId: '72.03', | ||
credits: 3, | ||
name: 'Introducción a Informática', | ||
semester: 1 | ||
}, | ||
{ | ||
courseId: '94.21', | ||
credits: 6, | ||
name: 'Formacion General I', | ||
semester: 5 | ||
} | ||
] | ||
}; | ||
|
||
this.filter = { | ||
id: $routeParams.id, | ||
name: $routeParams.name | ||
}; | ||
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
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,19 @@ | ||
@import 'modules/variables/importer'; | ||
|
||
.students-inscriptions-container { | ||
.table { | ||
.actions-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
|
||
.btn { | ||
flex: 1; | ||
min-width: 150px; | ||
max-width: 200px; | ||
margin: 10px; | ||
margin-left: 0; | ||
} | ||
} | ||
} | ||
} |
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='StudentsInscriptionsCtrl as controller' class='students-inscriptions-container'> | ||
<!-- Page Heading --> | ||
<div class='page-header break-words'> | ||
<h1 class='inline'> | ||
<span translate='i18nStudents'></span> | ||
</h1> | ||
<h2 class='inline'> | ||
<span> - </span> | ||
<span> {{controller.student.firstName}} {{controller.student.lastName}}</span> | ||
<small> - </small> | ||
<small translate='i18nStudentInscriptions'></small> | ||
</h2> | ||
</div> | ||
<!-- /Page Heading --> | ||
|
||
<!-- Filter --> | ||
<div class='filter-container'> | ||
<div class='filter-fields'> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate=i18nCourseId></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.id' placeholder="{{ 'i18nCourseId' | translate }}..."/> | ||
</div> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate='i18nCourseName'></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.name' placeholder="{{ 'i18nCourseName' | 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 --> | ||
|
||
<!-- Content --> | ||
<div class='table-responsive'> | ||
<table class='table table-hover'> | ||
<thead> | ||
<tr> | ||
<th translate='i18nCourseId'></th> | ||
<th translate='i18nCourseName'></th> | ||
<th translate='i18nCredits'></th> | ||
<th translate='i18nSemester'></th> | ||
<th translate='i18nActions'></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-hide='controller.student.availableCourses.length > 0' class='bg-warning'> | ||
<td colspan='5' class='text-danger text-center' translate='i18nNoCoursesFound'></td> | ||
</tr> | ||
<tr ng-repeat='course in controller.student.availableCourses'> | ||
<td>{{ course.courseId }}</td> | ||
<td>{{ course.name }}</td> | ||
<td>{{ course.credits }}</td> | ||
<td>{{ course.semester }}</td> | ||
<td class='actions-container'> | ||
<a class='btn btn-info' role='button'> | ||
<span class='fa fa-list-alt' aria-hidden='true'></span> | ||
<span translate='i18nEnroll'></span> | ||
</a> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-info-circle' aria-hidden='true'></span> | ||
<span translate='i18nCourseShow'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- Content --> | ||
</div> |