public front: can choose levels to display in levels table

This commit is contained in:
nemunaire 2018-01-23 03:52:24 +01:00
commit 233286a0fe
3 changed files with 10 additions and 2 deletions

View file

@ -119,7 +119,7 @@
</tr>
</thead>
<tbody class="table-bordered bg-secondary text-dark" ng-if="s.params.kind == 'levels'">
<tr ng-repeat="lvl in [1,2,3,4,5,6,7,8,9,10]">
<tr ng-repeat="lvl in s.params.levels">
<th class="text-center"><nobr>Niveau {{ lvl }}</nobr></th>
<td ng-repeat="(tid,th) in themes" class="text-center" ng-if="s.params.themes.indexOf(tid-0) !== -1">
<span ng-repeat="exercice in th.exercices" ng-if="$index == lvl-1 && (exercice.tried || lvl == 1)" ng-class="{'text-primary': exercice.solved == 0, 'text-success': exercice.solved >= 1, 'text-bold': exercice.solved >= 1, 'text-warning': exercice.solved == 0 && exercice.tried}">