server/admin/static/views/theme.html

46 lines
1.9 KiB
HTML
Raw Normal View History

2016-12-26 00:20:06 +00:00
<h2>{{theme.name}} <small>{{theme.authors}}</small></h2>
2017-12-17 15:07:04 +00:00
<form ng-submit="saveTheme()">
<div class="form-group row" ng-repeat="field in fields">
<label for="{{ field }}" class="col-sm-1 col-form-label-sm">{{ field | capitalize }}</label>
<div class="col-sm-11">
2017-12-17 15:07:04 +00:00
<input type="text" class="form-control form-control-sm" id="{{ field }}" ng-model="theme[field]">
</div>
2016-01-22 16:37:29 +00:00
</div>
<div class="text-right" ng-show="theme.id">
2017-12-17 15:07:04 +00:00
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Save</button>
<button class="btn btn-danger" ng-click="deleteTheme()"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</button>
</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>
2017-12-17 15:07:04 +00:00
<hr>
<div ng-show="theme.id" ng-controller="ExercicesListController">
2017-12-17 15:07:04 +00:00
<h3>
Exercices
<button ng-click="show('new')" class="float-right btn btn-sm btn-primary" style="margin-left: 10px;"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter un exercice</button>
<button ng-click="syncExo()" ng-class="{'disabled': inSync}" class="float-right btn btn-sm btn-light"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Synchroniser</button>
</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>
2017-12-17 15:07:04 +00:00
<table class="table table-hover table-bordered table-striped table-sm">
<thead class="thead-dark">
2016-01-22 16:37:29 +00:00
<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>