frontend: new page that list videos

This commit is contained in:
nemunaire 2017-04-02 20:29:15 +02:00 committed by Pierre-Olivier Mercier
parent 31c079701f
commit 5a6b27ff18
2 changed files with 20 additions and 0 deletions

View file

@ -13,6 +13,10 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
controller: "RankController", controller: "RankController",
templateUrl: "views/rank.html" templateUrl: "views/rank.html"
}) })
.when("/videos", {
controller: "VideosController",
templateUrl: "views/videos.html"
})
.when("/:theme", { .when("/:theme", {
controller: "ExerciceController", controller: "ExerciceController",
templateUrl: "views/theme.html" templateUrl: "views/theme.html"
@ -339,6 +343,12 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
} }
}; };
}) })
.controller("VideosController", function($scope, $rootScope) {
$rootScope.current_theme = 0;
$rootScope.current_exercice = 0;
$rootScope.title = "Vidéos de résolution";
$rootScope.authors = "";
})
.controller("HomeController", function($scope, $rootScope) { .controller("HomeController", function($scope, $rootScope) {
$rootScope.current_theme = 0; $rootScope.current_theme = 0;
$rootScope.current_exercice = 0; $rootScope.current_exercice = 0;

View file

@ -0,0 +1,10 @@
<div class="list-group">
<ng-repeat ng-repeat="theme in themes">
<h4 class="list-group-item">
{{ theme.name }}
</h4>
<ng-repeat ng-repeat="(eid,exercice) in theme.exercices">
<a class="list-group-item" href="{{ my.exercices[eid].video_uri }}">{{ exercice.title }}</a>
</ng-repeat>
</ng-repeat>
</div>