frontend: click on card to go to the related theme/defi
This commit is contained in:
parent
f2f94a399b
commit
e2fdce10ef
3 changed files with 13 additions and 4 deletions
|
@ -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() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
<div class="card-columns">
|
||||
<div class="card niceborder excard" ng-repeat="(k,theme) in themes">
|
||||
<div class="card niceborder excard" ng-repeat="(k,theme) in themes" ng-click="goTheme()">
|
||||
<div class="card-img-top theme-card" ng-show="theme.image" style="background-image: url({{ theme.image }})"></div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title clearfix">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="card-columns">
|
||||
<div class="card niceborder excard" ng-repeat="ex in exercices">
|
||||
<div class="card niceborder excard" ng-repeat="ex in exercices" ng-click="goDefi()">
|
||||
<div class="card-img-top theme-card" ng-show="ex.theme.image" style="background-image: url({{ ex.theme.image }})"></div>
|
||||
<div class="card-body">
|
||||
<h6 class="card-title clearfix">
|
||||
|
|
Reference in a new issue