frontend: click on card to go to the related theme/defi

This commit is contained in:
nemunaire 2018-12-08 20:22:41 +01:00
parent f2f94a399b
commit e2fdce10ef
3 changed files with 13 additions and 4 deletions

View file

@ -558,7 +558,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
$location.url("/");
});
})
.controller("TagController", function($scope, $rootScope, $routeParams) {
.controller("TagController", function($scope, $rootScope, $routeParams, $location) {
$rootScope.current_theme = 0;
$rootScope.current_exercice = 0;
$rootScope.current_tag = $routeParams.tag;
@ -577,6 +577,11 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
})
})
})
$scope.goDefi = function() {
$location.url("/" + this.ex.theme.urlid + "/" + this.ex.exercice.urlid);
}
})
.controller("RankController", function($scope, $rootScope) {
$rootScope.current_theme = 0;
@ -604,12 +609,16 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
$rootScope.title = "Vidéos de résolution";
$rootScope.authors = "";
})
.controller("HomeController", function($scope, $rootScope) {
.controller("HomeController", function($scope, $rootScope, $location) {
$rootScope.current_theme = 0;
$rootScope.current_exercice = 0;
$rootScope.current_tag = undefined;
$rootScope.title = "Bienvenue au challenge forensic de l'ÉPITA !";
$rootScope.authors = "";
$scope.goTheme = function() {
$location.url("/" + this.theme.urlid);
}
});
function sready() {