diff --git a/frontend/static/js/challenge.js b/frontend/static/js/challenge.js index 7a670ddb..ffd1777b 100644 --- a/frontend/static/js/challenge.js +++ b/frontend/static/js/challenge.js @@ -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() { diff --git a/frontend/static/views/home.html b/frontend/static/views/home.html index 91b2672d..3254861c 100644 --- a/frontend/static/views/home.html +++ b/frontend/static/views/home.html @@ -15,7 +15,7 @@