-
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 Correlatives New View (#83)
- Loading branch information
1 parent
81410ba
commit 40e0f6f
Showing
6 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
app/scripts/controllers/courses/CoursesCorrelativesNewCtrl.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,49 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('CoursesCorrelativesNewCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
|
||
this.course = { | ||
courseId: '72.03', | ||
credits: 3, | ||
name: 'Introducción a Informática', | ||
semester: 1, | ||
availableCorrelatives: [ | ||
{ | ||
courseId: '72.03', | ||
credits: 3, | ||
name: 'Introducción a Informática', | ||
semester: 1 | ||
}, | ||
{ | ||
courseId: '94.21', | ||
credits: 6, | ||
name: 'Formacion General I', | ||
semester: 5 | ||
}, | ||
{ | ||
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,20 @@ | ||
@import 'modules/variables/importer'; | ||
|
||
.courses-correlatives-new-container { | ||
.table { | ||
.actions-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
justify-content: flex-start; | ||
|
||
.btn { | ||
flex: 1; | ||
min-width: 175px; | ||
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='CoursesCorrelativesNewCtrl as controller' class='courses-correlatives-new-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='i18nAddCorrelative'></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.course.availableCorrelatives.length > 0' class='bg-warning'> | ||
<td colspan='5' class='text-danger text-center' translate='i18nNoCoursesFound'></td> | ||
</tr> | ||
<tr ng-repeat='course in controller.course.availableCorrelatives'> | ||
<td>{{ course.courseId }}</td> | ||
<td>{{ course.name }}</td> | ||
<td>{{ course.credits }}</td> | ||
<td>{{ course.semester }}</td> | ||
<td class='actions-container'> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-info-circle' aria-hidden='true'></span> | ||
<span translate='i18nCourseShow'></span> | ||
</a> | ||
<a class='btn btn-info' role='button'> | ||
<span class='fa fa-pencil-square-o' aria-hidden='true'></span> | ||
<span translate='i18nAddCorrelative'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- Content --> | ||
</div> |