From 869105dc40efed6d253158294f330b87e61599cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Tue, 21 Mar 2017 16:16:38 +0100 Subject: [PATCH] Minor fixes - Added motion change recommendations to full text search. - Show csv/docx export entries in list views for manager only. --- .../agenda/static/templates/agenda/item-list.html | 2 +- openslides/motions/static/js/motions/base.js | 12 ++++++++++++ .../static/templates/motions/motion-list.html | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index 23b8b2b66..9798f0ddf 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -104,7 +104,7 @@ -
  • +
  • diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index d9097c48d..0d82c2dcf 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -408,6 +408,18 @@ angular.module('OpenSlidesApp.motions', [ if (!foundSomething && motion.category && motion.category.name.match(new RegExp(searchquery, 'i'))) { foundSomething = true; } + + // search for change recommendation + if (!foundSomething) { + var recommendations = MotionChangeRecommendation.filter({ + where: {motion_version_id: this.active_version} + }); + foundSomething = _.some(recommendations, function(recommendation) { + if (recommendation.text.match(new RegExp(searchquery, 'i'))) { + return true; + } + }); + } return foundSomething; }, getChangeRecommendations: function (versionId, order) { diff --git a/openslides/motions/static/templates/motions/motion-list.html b/openslides/motions/static/templates/motions/motion-list.html index 76e43e8df..b607b2ca8 100644 --- a/openslides/motions/static/templates/motions/motion-list.html +++ b/openslides/motions/static/templates/motions/motion-list.html @@ -57,7 +57,7 @@
  • -
  • +
  • @@ -65,7 +65,7 @@
  • -
  • +
  • DOCX