2022-05-19 19:15:25 +00:00
< div class = "d-flex justify-content-between" >
< h2 > Exercices< / h2 >
< div class = "align-self-center" >
2022-05-24 19:25:27 +00:00
< a
href="tags"
class="btn btn-sm btn-dark"
>
< span class = "glyphicon glyphicon-th" aria-hidden = "true" > < / span > Tags
< / a >
2022-05-19 19:15:25 +00:00
< a
href="files"
class="btn btn-sm btn-info"
>
< span class = "glyphicon glyphicon-file" aria-hidden = "true" > < / span > Voir les fichiers
< / a >
< div class = "btn-group btn-group-toggle ml-2 mr-1" >
2018-02-04 21:15:40 +00:00
< label class = "btn btn-sm btn-secondary" ng-class = "{active: syncFiles, 'btn-warning': syncFiles}" >
< input type = "checkbox" ng-model = "syncFiles" > Fichiers
< / label >
< label class = "btn btn-sm btn-secondary" ng-class = "{active: syncHints, 'btn-warning': syncHints}" ng-show = "whoami" >
< input type = "checkbox" ng-model = "syncHints" > Indices
< / label >
2018-09-24 08:00:17 +00:00
< label class = "btn btn-sm btn-secondary" ng-class = "{active: syncFlags, 'btn-warning': syncFlags}" >
< input type = "checkbox" ng-model = "syncFlags" > Flags
2018-02-04 21:15:40 +00:00
< / label >
< / div >
2022-05-19 19:15:25 +00:00
< button
type="button"
ng-click="syncFull()"
ng-class="{'disabled': inSync}"
class="btn btn-sm btn-secondary"
>
< span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > Synchroniser
< / button >
< / div >
< / div >
2017-12-17 14:39:20 +00:00
< div class = "progress" ng-if = "inSync" >
< div class = "progress-bar" style = "width: {{ done * 100 / total }}%;" > < / div >
< / div >
2016-12-26 00:23:31 +00:00
< div >
2020-01-29 17:18:25 +00:00
< p > < input type = "search" class = "form-control" placeholder = "Search" ng-model = "query" ng-keypress = "validateSearch($event)" autofocus > < / 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-12-26 00:23:31 +00:00
< tr >
2018-11-21 00:19:13 +00:00
< th >
< input type = "checkbox" ng-click = "toggleSelectAll()" ng-model = "selectall" >
< / th >
2016-12-26 00:23:31 +00:00
< th ng-repeat = "field in fields" >
{{ field }}
< / th >
2018-12-08 20:17:37 +00:00
< th >
Thème
< / th >
2016-12-26 00:23:31 +00:00
< / tr >
< / thead >
< tbody >
2018-11-21 00:19:13 +00:00
< tr ng-repeat = "exercice in exercices | filter: query" >
< td >
< input type = "checkbox" ng-model = "exercice.selected" >
< / td >
< td ng-repeat = "field in fields" ng-click = "show(exercice.id)" >
2018-12-08 20:24:30 +00:00
{{ exercice[field] | stripHTML }}
2016-12-26 00:23:31 +00:00
< / td >
2018-12-08 20:17:37 +00:00
< td >
< a ng-href = "themes/{{ exercice.id_theme }}" > {{ themes[exercice.id_theme].name }}< / a >
< / td >
2016-12-26 00:23:31 +00:00
< / tr >
< / tbody >
< / table >
< / div >
2018-11-21 00:19:13 +00:00
< form ng-submit = "updateExercices()" >
< fieldset >
< legend class = "text-dark" > Édition de masse < button type = "submit" class = "float-right btn btn-sm btn-success" > < span class = "glyphicon glyphicon-ok" aria-hidden = "true" > < / span > < / button > < / legend >
2023-03-20 10:23:27 +00:00
< p >
Les propriétés en gras seront écrasées.
< / p >
< div ng-class = "{'row': field != 'disabled', 'form-group': field != 'disabled', 'form-check': field == 'disabled'}" ng-repeat = "field in ['disabled','gain','coefficient','issue','issuekind']" >
2023-03-20 10:23:03 +00:00
< input type = "checkbox" class = "form-check-input" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'disabled'" >
2023-03-20 10:23:27 +00:00
< label for = "{{ field }}" class = "col-form-label-sm" ng-class = "{'col-sm-1': field != 'disabled', 'font-weight-bold': exercice[field] !== undefined}" > {{ field | capitalize }}< / label >
2023-03-20 10:23:03 +00:00
< div class = "col-sm-11" ng-if = "field != 'disabled'" >
2018-11-21 01:20:37 +00:00
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field != 'statement' && field != 'issue' && field != 'issuekind' && field != 'overview' && field != 'depend' && field != 'gain' && field != 'coefficient'" >
2018-11-21 00:19:13 +00:00
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'gain'" integer >
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'coefficient'" float >
2018-11-21 01:20:37 +00:00
< textarea class = "form-control form-control-sm" id = "{{field}}" ng-model = "exercice[field]" ng-if = "field == 'statement' || field == 'overview' || field == 'issue'" > < / textarea >
2018-11-21 00:19:13 +00:00
< select class = "form-control form-control-sm" id = "{{field}}" ng-model = "exercice[field]" ng-options = "ex.id as ex.title group by ex.path.split('/')[0] for ex in exercices" ng-if = "field == 'depend'" >
< option value = "" > Aucune< / option >
< / select >
2018-11-21 01:20:37 +00:00
< select class = "form-control form-control-sm" id = "{{field}}" ng-model = "exercice[field]" ng-options = "v for v in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark']" ng-if = "field == 'issuekind'" > < / select >
2018-11-21 00:19:13 +00:00
< / div >
< / div >
< / fieldset >
< / form >