admin: display important information first

No more useless column, link with theme when possible
This commit is contained in:
Pierre-Olivier Mercier 2018-12-08 21:24:30 +01:00
parent 81ce648b5d
commit 83ad6340b2
4 changed files with 6 additions and 6 deletions

View File

@ -897,7 +897,7 @@ angular.module("FICApp")
.controller("ThemesListController", function($scope, Theme, $location, $rootScope, $http) {
$scope.themes = Theme.query();
$scope.fields = ["id", "name"];
$scope.fields = ["name", "authors", "headline", "path"];
$scope.show = function(id) {
$location.url("/themes/" + id);
@ -956,7 +956,7 @@ angular.module("FICApp")
$scope.exercices = Exercice.query();
$scope.exercice = {}; // Array used to save fields to updates in selected exercices
$scope.fields = ["title", "overview"];
$scope.fields = ["title", "headline"];
$scope.toggleSelectAll = function() {
angular.forEach($filter('filter')($scope.exercices, $scope.query), function(ex) {
@ -1023,7 +1023,7 @@ angular.module("FICApp")
})
.controller("ExercicesListController", function($scope, ThemedExercice, $routeParams, $location, $rootScope, $http) {
$scope.exercices = ThemedExercice.query({ themeId: $routeParams.themeId });
$scope.fields = ["title", "statement", "overview", "videoURI"];
$scope.fields = ["title", "headline", "issue"];
$scope.show = function(id) {
$location.url("/themes/" + $routeParams.themeId + "/exercices/" + id);

View File

@ -41,7 +41,7 @@
<input type="checkbox" ng-model="exercice.selected">
</td>
<td ng-repeat="field in fields" ng-click="show(exercice.id)">
{{ exercice[field] }}
{{ exercice[field] | stripHTML }}
</td>
<td>
<a ng-href="themes/{{ exercice.id_theme }}">{{ themes[exercice.id_theme].name }}</a>

View File

@ -16,7 +16,7 @@
<tbody>
<tr ng-repeat="theme in themes | filter: query" ng-click="show(theme.id)">
<td ng-repeat="field in fields">
{{ theme[field] }}
{{ theme[field] | stripHTML }}
</td>
</tr>
</tbody>

View File

@ -35,7 +35,7 @@
<tbody>
<tr ng-repeat="exercice in exercices | filter: query" ng-click="show(exercice.id)">
<td ng-repeat="field in fields">
{{ exercice[field] }}
{{ exercice[field] | stripHTML }}
</td>
</tr>
</tbody>