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:
parent
861df5f5c1
commit
869105dc40
@ -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>
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user