-
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 Show View Add style for actions buttons Add style for h3 headers
- Loading branch information
1 parent
d0e9d74
commit d1d97fc
Showing
9 changed files
with
224 additions
and
4 deletions.
There are no files selected for viewing
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,53 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('CoursesShowCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
var courseId = $routeParams.courseId; // For future Service calls | ||
|
||
this.formatDate = function(finalExamDate) { | ||
var date = finalExamDate.split('T')[0]; | ||
var time = finalExamDate.split('T')[1]; | ||
return date.split('-')[2] + '/' + date.split('-')[1] + '/' + date.split('-')[0] + ' ' + time; | ||
}; | ||
|
||
this.course = { | ||
courseId: '93.42', | ||
credits: 6, | ||
name: 'Física II', | ||
semester: 3, | ||
correlatives: [ | ||
{ | ||
'courseId': '93.41', | ||
'credits': 6, | ||
'name': 'Física I', | ||
'semester': 2 | ||
}, | ||
{ | ||
'courseId': '93.17', | ||
'credits': 6, | ||
'name': 'Matemática I', | ||
'semester': 1 | ||
} | ||
], | ||
finalInscriptions: [ | ||
{ | ||
id: '1', | ||
courseId: '93.42', | ||
vacancy: '12', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-01-20T18:45', | ||
state: 'OPEN' | ||
}, | ||
{ | ||
id: '2', | ||
courseId: '93.42', | ||
vacancy: '6', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-02-15T14:00', | ||
state: 'CLOSED' | ||
} | ||
] | ||
}; | ||
}]); | ||
}); |
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
File renamed without changes.
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,37 @@ | ||
@import 'modules/variables/importer'; | ||
|
||
.courses-show-container { | ||
.data-container { | ||
width: 100%; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
|
||
.data-item { | ||
width: 200px; | ||
padding: 5px; | ||
|
||
.break-words { | ||
display: inline-block; | ||
word-wrap: break-word; /* Internet Explorer 5.5+ */ | ||
width: 190; /* width is mandatory to make break-word work on Mozzila */ | ||
} | ||
} | ||
} | ||
.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,107 @@ | ||
<div ng-controller='CoursesShowCtrl as controller' class='courses-show-container'> | ||
<!-- Page Heading --> | ||
<div class='page-header break-words'> | ||
<h1 class='inline'> | ||
<span translate='i18nCourses'></span> | ||
</h1> | ||
<h2 class='inline'> | ||
<span> - </span> | ||
<span> {{controller.course.name}}</span> | ||
<small> - </small> | ||
<small translate='i18nInformation'></small> | ||
</h2> | ||
</div> | ||
<!-- /Page Heading --> | ||
|
||
<!-- Course Data --> | ||
<div class='data-container'> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nCourseId'></p> | ||
<p class='break-words'>{{controller.course.courseId}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nCourseName'></p> | ||
<p class='break-words'>{{controller.course.name}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nCredits'></p> | ||
<p class='break-words'>{{controller.course.credits}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nSemester'></p> | ||
<p class='break-words'>{{controller.course.semester}}</p> | ||
</div> | ||
</div> | ||
<!-- /Course Data --> | ||
|
||
<!-- Correlatives --> | ||
<h3 translate='i18nCorrelatives' class='page-sub-header'></h3> | ||
<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.correlatives.length > 0' class='bg-warning'> | ||
<td colspan='5' class='text-danger text-center' translate='i18nNoCorrelativesFound'></td> | ||
</tr> | ||
<tr ng-repeat='course in controller.course.correlatives'> | ||
<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='i18nInformation'></span> | ||
</a> | ||
<a class='btn btn-danger' role='button'> | ||
<span class='fa fa-trash' aria-hidden='true'></span> | ||
<span translate='i18nDeleteCorrelative'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /Correlatives --> | ||
|
||
<!-- Final Exams --> | ||
<h3 translate='i18nFinalExams' class='page-sub-header'></h3> | ||
<div class='table-responsive'> | ||
<table class='table table-hover'> | ||
<thead> | ||
<tr> | ||
<th translate='i18nFinalExamDate'></th> | ||
<th translate='i18nVacancy'></th> | ||
<th translate='i18nState'></th> | ||
<th translate='i18nActions'></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-hide='controller.course.finalInscriptions.length > 0' class='bg-warning'> | ||
<td colspan='4' class='text-danger text-center' translate='i18nNoFinalExamsFound'></td> | ||
</tr> | ||
<tr ng-repeat='inscription in controller.course.finalInscriptions'> | ||
<td>{{controller.formatDate(inscription.finalExamDate)}}</td> | ||
<td>{{ inscription.vacancy }}/{{ inscription.maxVacancy }}</td> | ||
<td ng-show="inscription.state == 'OPEN'" translate='i18nInscriptionOpen'></td> | ||
<td ng-show="inscription.state == 'CLOSED'" translate='i18nInscriptionClosed'></td> | ||
<td class='actions-container'> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-info-circle' aria-hidden='true'></span> | ||
<span translate='i18nInformation'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /Final Exams --> | ||
</div> |
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