Add optional variable to education for courses where scaling doesn't make sense (#231)

* Add optional variable to education

Scales for courses doesnt always apply

* Rename var

*not* !important

* Rename var

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Roxedus 2021-02-16 11:39:25 +01:00 committed by GitHub
parent a15f7364f8
commit 0104c49a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -51,18 +51,19 @@
{{ if .takenCourses }}
<div class="taken-courses">
<h6 class="text-muted">{{ i18n "taken_courses"}}</h6>
{{ if .takenCourses.showGrades }}
{{ if .takenCourses.showGrades }}
{{ $hideScale := .takenCourses.hideScale }}
<table>
<thead>
<th>{{ i18n "course_name"}}</th>
<th>{{ i18n "total_credit"}}</th>
{{ if not $hideScale }}<th>{{ i18n "total_credit"}}</th>{{ end }}
<th>{{ i18n "obtained_credit"}}</th>
</thead>
<tbody>
{{ range $index,$course := .takenCourses.courses }}
<tr class="course {{ if gt $index 1 }}hidden-course{{ end}}">
<td>{{ $course.name }}</td>
<td>{{ $course.outOf }}</td>
{{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }}
<td>{{ $course.achieved }}</td>
</tr>
{{ end }}