2016-12-26 00:20:06 +00:00
|
|
|
<h2>{{theme.name}} <small>{{theme.authors}}</small></h2>
|
|
|
|
|
2016-12-27 20:08:36 +00:00
|
|
|
<form ng-submit="saveTheme()" class="form-horizontal">
|
2016-01-22 16:37:29 +00:00
|
|
|
<div class="form-group" ng-repeat="field in fields">
|
2016-12-27 20:08:36 +00:00
|
|
|
<label for="{{ field }}" class="col-sm-1 control-label">{{ field | capitalize }}</label>
|
|
|
|
<div class="col-sm-11">
|
|
|
|
<input type="text" class="form-control" id="{{ field }}" ng-model="theme[field]">
|
|
|
|
</div>
|
2016-01-22 16:37:29 +00:00
|
|
|
</div>
|
2016-12-27 20:08:36 +00:00
|
|
|
<div class="text-right" ng-show="theme.id">
|
2016-12-26 00:20:06 +00:00
|
|
|
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Save</button>
|
2016-12-27 20:08:36 +00:00
|
|
|
<a class="btn btn-danger" ng-click="deleteTheme()"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a>
|
|
|
|
</div>
|
|
|
|
<div class="text-right" ng-show="!theme.id">
|
|
|
|
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Create theme</button>
|
2016-12-26 00:20:06 +00:00
|
|
|
</div>
|
2016-01-22 16:37:29 +00:00
|
|
|
</form>
|
|
|
|
|
2016-12-27 20:08:36 +00:00
|
|
|
<div ng-show="theme.id" ng-controller="ExercicesListController">
|
|
|
|
<h3>Exercices<a ng-click="show('new')" class="pull-right btn btn-sm btn-primary"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter un exercice</a></h3>
|
2016-12-26 00:20:06 +00:00
|
|
|
|
2016-01-22 16:37:29 +00:00
|
|
|
<p><input type="search" class="form-control" placeholder="Search" ng-model="query"></p>
|
|
|
|
<table class="table table-hover table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th ng-repeat="field in fields">
|
|
|
|
{{ field }}
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2016-12-26 00:20:06 +00:00
|
|
|
<tr ng-repeat="exercice in exercices | filter: query" ng-click="show(exercice.id)">
|
2016-01-22 16:37:29 +00:00
|
|
|
<td ng-repeat="field in fields">
|
2016-12-26 00:20:06 +00:00
|
|
|
{{ exercice[field] }}
|
2016-01-22 16:37:29 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|