[admin] Add page title
This commit is contained in:
parent
0551863bc5
commit
f9c053397a
4 changed files with 22 additions and 8 deletions
|
@ -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/");});
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Reference in a new issue