From 2cd826202589715068b94ab417b16cde782c06f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Thu, 23 Aug 2018 11:12:53 +0200 Subject: [PATCH] Fix sorting of states in workflow detail view. --- openslides/motions/static/js/motions/workflow.js | 4 +++- .../templates/motions/workflow-detail.html | 16 ++++++++-------- .../templates/users/user-change-password.html | 5 +++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/openslides/motions/static/js/motions/workflow.js b/openslides/motions/static/js/motions/workflow.js index db22d55aa..79ace06ed 100644 --- a/openslides/motions/static/js/motions/workflow.js +++ b/openslides/motions/static/js/motions/workflow.js @@ -49,7 +49,9 @@ angular.module('OpenSlidesApp.motions.workflow', []) return Workflow.lastModified(workflowId); }, function () { $scope.workflow = Workflow.get(workflowId); - _.forEach($scope.workflow.states, function (state) { + $scope.states = $scope.workflow.states; + $scope.states = _.orderBy($scope.states, 'id'); + _.forEach($scope.states, function (state) { state.newActionWord = gettextCatalog.getString(state.action_word); state.newRecommendationLabel = gettextCatalog.getString(state.recommendation_label); }); diff --git a/openslides/motions/static/templates/motions/workflow-detail.html b/openslides/motions/static/templates/motions/workflow-detail.html index 29c8da0ca..c59e31dd9 100644 --- a/openslides/motions/static/templates/motions/workflow-detail.html +++ b/openslides/motions/static/templates/motions/workflow-detail.html @@ -40,7 +40,7 @@

Permissions

- + {{ state.name | translate }} @@ -69,7 +69,7 @@ Action word - +
@@ -88,7 +88,7 @@ Recommendation label - +
+ Initial password: {{ user.default_password }} - Initial password: {{ user.default_password }} - +
+ Username: {{ user.username }} Show password