Minor fixes

- Added motion change recommendations to full text search.
- Show csv/docx export entries in list views for manager only.
This commit is contained in:
Emanuel Schütze 2017-03-21 16:16:38 +01:00
parent 861df5f5c1
commit 869105dc40
3 changed files with 15 additions and 3 deletions

View File

@ -104,7 +104,7 @@
</a>
</li>
<!-- CSV export -->
<li>
<li os-perms="agenda.can_manage">
<a href="" id="downloadLinkCSV"
ng-click="csvExport()">
<i class="fa fa-file-text-o"></i>

View File

@ -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) {

View File

@ -57,7 +57,7 @@
</a>
</li>
<!-- CSV export -->
<li>
<li os-perms="motions.can_manage">
<a href="" id="downloadLinkCSV"
ng-click="csvExport()">
<i class="fa fa-file-text-o"></i>
@ -65,7 +65,7 @@
</a>
</li>
<!-- DOCX export -->
<li>
<li os-perms="motions.can_manage">
<a href="" ng-click="docxExport()">
<i class="fa fa-file-word-o"></i>
DOCX