admin: Can list independant exercices as theme
This commit is contained in:
parent
d26333c5e2
commit
5e262b75a3
3 changed files with 27 additions and 8 deletions
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form ng-submit="saveTheme()" class="col-4">
|
||||
<form ng-submit="saveTheme()" class="col-4" ng-if="!(theme.id === 0 && theme.path)">
|
||||
<div ng-class="{'form-group': field != 'locked', 'form-check': field == 'locked'}" ng-repeat="field in fields">
|
||||
<input type="checkbox" class="form-check-input" id="{{ field }}" ng-model="theme[field]" ng-if="field == 'locked'">
|
||||
<label for="{{ field }}">{{ field | capitalize }}</label>
|
||||
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<div ng-if="theme.id" class="col-md-8" ng-controller="ExercicesListController">
|
||||
<div ng-if="theme.id || theme.path" class="col-md-8" ng-class="{'offset-md-2': theme.id === 0 && theme.path}" ng-controller="ExercicesListController">
|
||||
<h3>
|
||||
Exercices ({{ exercices.length }})
|
||||
<button type="button" ng-click="show('new')" class="float-right btn btn-sm btn-primary ml-2"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter un exercice</button>
|
||||
|
|
Reference in a new issue