public: news carousel for ranking
This commit is contained in:
parent
62aea5413e
commit
00688cb996
@ -548,6 +548,7 @@ angular.module("FICApp")
|
||||
"exercices": "Exercices",
|
||||
"teams": "Équipes",
|
||||
"themes": "Thèmes",
|
||||
"ranking": "Classement",
|
||||
};
|
||||
$scope.colors = {
|
||||
"primary": "Primaire",
|
||||
|
@ -1,5 +1,15 @@
|
||||
angular.module("FICApp", ["ngSanitize", "ngAnimate"]);
|
||||
|
||||
angular.module("FICApp")
|
||||
.filter("objectLength", function() {
|
||||
return function(input) {
|
||||
if (input !== undefined)
|
||||
return Object.keys(input).length;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
});
|
||||
|
||||
String.prototype.capitalize = function() {
|
||||
return this
|
||||
.toLowerCase()
|
||||
@ -183,6 +193,7 @@ angular.module("FICApp")
|
||||
this.push(team);
|
||||
}
|
||||
}, $scope.rank);
|
||||
$scope.pagesrank = Array(Math.ceil($scope.rank.length / 7)).fill(0).map(function(v, i){ return i; });
|
||||
});
|
||||
}
|
||||
refreshData();
|
||||
|
@ -211,6 +211,31 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="carousel slide" data-interval="10000" style="height: 260px" autocarousel ng-if="s.params.kind == 'ranking'">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item" ng-repeat="(i,t) in pagesrank" ng-class="{active: $first}">
|
||||
<div class="carousel-caption">
|
||||
<table class="table table-bordered table-striped table-sm">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th class="text-right">Place</th>
|
||||
<th>Équipe</th>
|
||||
<th>Score</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="r in rank | orderBy: 'rank' | limitTo: 7: 7*i">
|
||||
<th class="text-right">{{ r.rank }}<sup ng-if="r.rank == 1">er</sup><sup ng-if="r.rank > 1">e</sup></th>
|
||||
<td>{{ r.name }}</td>
|
||||
<td>{{ r.score }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="carousel slide" data-interval="30000" style="height: 270px" autocarousel ng-if="s.params.kind == 'exercices'">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-slide-to="{{k}}" ng-repeat="(k, exercice) in my.exercices" ng-class="{active: $first}"></li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user