[admin] Add page title

This commit is contained in:
nemunaire 2016-12-26 01:20:06 +01:00 committed by Pierre-Olivier Mercier
parent 0551863bc5
commit f9c053397a
4 changed files with 22 additions and 8 deletions

View file

@ -111,12 +111,15 @@ angular.module("FICApp")
$location.url("/themes/" + id);
};
})
.controller("ThemeController", function($scope, Theme, $routeParams) {
.controller("ThemeController", function($scope, Theme, $routeParams, $location) {
$scope.theme = Theme.get({ themeId: $routeParams.themeId });
$scope.fields = ["name"];
$scope.fields = ["name", "authors"];
$scope.saveTheme = function() {
this.theme.$save({themeId: this.theme.themeId});
this.theme.$update();
}
$scope.deleteTheme = function() {
this.theme.$remove(function() { $location.url("/themes/");});
}
})