X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=ext%2Fsearch%2Fang%2FcrmSearchAdmin%2FcrmSearchAdmin.component.js;h=1b29fe45c6d23affacaeabd1ef8a4f5de9d8815d;hb=465bc32a8c9bb7135ccea1ea10aadd5d62407703;hp=a62dc05a2c10828e912f1e499bc13a116480fa58;hpb=b316694b493ef728c52124fb736c23b9f4fabe3f;p=civicrm-core.git diff --git a/ext/search/ang/crmSearchAdmin/crmSearchAdmin.component.js b/ext/search/ang/crmSearchAdmin/crmSearchAdmin.component.js index a62dc05a2c..1b29fe45c6 100644 --- a/ext/search/ang/crmSearchAdmin/crmSearchAdmin.component.js +++ b/ext/search/ang/crmSearchAdmin/crmSearchAdmin.component.js @@ -27,7 +27,12 @@ $scope.controls = {tab: 'compose'}; $scope.joinTypes = [{k: false, v: ts('Optional')}, {k: true, v: ts('Required')}]; $scope.groupOptions = CRM.crmSearchActions.groupOptions; - $scope.entities = formatForSelect2(CRM.vars.search.schema, 'name', 'title_plural', ['description', 'icon']); + // Try to create a sensible list of entities one might want to search for, + // excluding those whos primary purpose is to provide joins or option lists to other entities + var primaryEntities = _.filter(CRM.vars.search.schema, function(entity) { + return !_.includes(entity.type, 'EntityBridge') && !_.includes(entity.type, 'OptionList'); + }); + $scope.entities = formatForSelect2(primaryEntities, 'name', 'title_plural', ['description', 'icon']); this.perm = { editGroups: CRM.checkPerm('edit groups') };