2022-05-31 14:41:36 +00:00
< div class = "d-flex align-items-start" >
< h2 class = "text-truncate" >
{{theme.name}} < small class = "text-muted" title = "{{theme.authors | stripHTML}}" > {{theme.authors | stripHTML}}< / small >
< / h2 >
< div class = "ml-auto d-flex flex-row-reverse text-nowrap" >
< a href = "{{theme.forge_link}}" target = "_blank" class = "ml-2 btn btn-sm btn-dark" ng-if = "theme.forge_link" > < span class = "glyphicon glyphicon-folder-open" aria-hidden = "true" > < / span > Voir sur la forge< / a >
< / div >
< / div >
2016-12-26 00:20:06 +00:00
2018-09-09 20:27:35 +00:00
< div class = "row" >
< form ng-submit = "saveTheme()" class = "col-4" >
2023-03-20 14:20:20 +00:00
< 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'" >
2018-09-09 20:27:35 +00:00
< label for = "{{ field }}" > {{ field | capitalize }}< / label >
2024-03-18 10:26:01 +00:00
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "theme[field]" ng-if = "field != 'intro' && field != 'locked' && field != 'background_color'" >
2018-01-06 14:26:06 +00:00
< textarea class = "form-control form-control-sm" id = "{{ field }}" ng-model = "theme[field]" ng-if = "field == 'intro'" > < / textarea >
2024-03-18 10:26:01 +00:00
< input type = "color" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "theme[field]" ng-if = "field == 'background_color'" color >
2016-12-27 20:08:36 +00:00
< / div >
2018-09-09 20:27:35 +00:00
< div class = "text-right" ng-show = "theme.id" >
< button type = "submit" class = "btn btn-success" > < span class = "glyphicon glyphicon-save" aria-hidden = "true" > < / span > Save< / button >
2018-11-18 20:34:08 +00:00
< button type = "button" class = "btn btn-danger" ng-click = "deleteTheme()" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > Delete< / button >
2018-09-09 20:27:35 +00:00
< / 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 >
< / div >
< / form >
2017-12-17 15:07:04 +00:00
2020-05-16 01:52:11 +00:00
< div ng-if = "theme.id" class = "col-md-8" ng-controller = "ExercicesListController" >
2018-09-09 20:27:35 +00:00
< h3 >
Exercices ({{ exercices.length }})
2018-11-18 20:34:08 +00:00
< 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 >
< button type = "button" ng-click = "syncExo()" ng-class = "{'disabled': inSync}" class = "float-right btn btn-sm btn-light ml-2" > < span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > Synchroniser< / button >
2018-09-09 20:27:35 +00:00
< / h3 >
2016-12-26 00:20:06 +00:00
2018-12-05 04:03:36 +00:00
< p > < input type = "search" class = "form-control form-control-sm" placeholder = "Search" ng-model = "query" autofocus > < / p >
2018-09-09 20:27:35 +00:00
< table class = "table table-hover table-bordered table-striped table-sm" >
< thead class = "thead-dark" >
< tr >
< th ng-repeat = "field in fields" >
{{ field }}
< / th >
< / tr >
< / thead >
< tbody >
< tr ng-repeat = "exercice in exercices | filter: query" ng-click = "show(exercice.id)" >
< td ng-repeat = "field in fields" >
2018-12-08 20:24:30 +00:00
{{ exercice[field] | stripHTML }}
2018-09-09 20:27:35 +00:00
< / td >
< / tr >
< / tbody >
< / table >
< / div >
2016-01-22 16:37:29 +00:00
< / div >