admin: can edit theme introductions
This commit is contained in:
parent
0f9c8e0335
commit
5e2e03f5e9
@ -632,7 +632,7 @@ angular.module("FICApp")
|
|||||||
})
|
})
|
||||||
.controller("ThemeController", function($scope, Theme, $routeParams, $location, $rootScope, $http) {
|
.controller("ThemeController", function($scope, Theme, $routeParams, $location, $rootScope, $http) {
|
||||||
$scope.theme = Theme.get({ themeId: $routeParams.themeId });
|
$scope.theme = Theme.get({ themeId: $routeParams.themeId });
|
||||||
$scope.fields = ["name", "authors"];
|
$scope.fields = ["name", "authors", "intro"];
|
||||||
|
|
||||||
$scope.saveTheme = function() {
|
$scope.saveTheme = function() {
|
||||||
if (this.theme.id) {
|
if (this.theme.id) {
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
<div class="form-group row" ng-repeat="field in fields">
|
<div class="form-group row" ng-repeat="field in fields">
|
||||||
<label for="{{ field }}" class="col-sm-1 col-form-label-sm">{{ field | capitalize }}</label>
|
<label for="{{ field }}" class="col-sm-1 col-form-label-sm">{{ field | capitalize }}</label>
|
||||||
<div class="col-sm-11">
|
<div class="col-sm-11">
|
||||||
<input type="text" class="form-control form-control-sm" id="{{ field }}" ng-model="theme[field]">
|
<input type="text" class="form-control form-control-sm" id="{{ field }}" ng-model="theme[field]" ng-if="field != 'intro'">
|
||||||
|
<textarea class="form-control form-control-sm" id="{{ field }}" ng-model="theme[field]" ng-if="field == 'intro'"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right" ng-show="theme.id">
|
<div class="text-right" ng-show="theme.id">
|
||||||
|
Loading…
Reference in New Issue
Block a user