diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index 84d08384c..7b490c44b 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1003,16 +1003,13 @@ angular.module('OpenSlidesApp.motions.site', [ $scope.getItemId = { state: function (motion) {return motion.state_id;}, comment: function (motion) { - // Map all populated fields to their names - return _.map( - // Returns all fields that are populated - _.filter($scope.commentsFieldsNoSpecialComments, function (field) { - return motion['comment ' + field.name]; - }), - function (field) { - return field.name; + var ids = []; + _.forEach(motion.comments, function (comment, id) { + if (comment) { + ids.push(id); } - ); + }); + return ids; }, category: function (motion) {return motion.category_id;}, motionBlock: function (motion) {return motion.motion_block_id;}, diff --git a/openslides/motions/static/templates/motions/motion-list.html b/openslides/motions/static/templates/motions/motion-list.html index d978189ee..43d4b1be8 100644 --- a/openslides/motions/static/templates/motions/motion-list.html +++ b/openslides/motions/static/templates/motions/motion-list.html @@ -168,30 +168,6 @@ - - - - Comment - - - - + + + + Comment + + + + done - - - - - {{ commentsField.name | translate }} - - - - - No comments set - + + + + + {{ commentsField.name }} + + + + + No comments set +