entity manager full-text search parameter
This commit is contained in:
@@ -89,6 +89,9 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (!empty($data['iconClass'])) {
|
||||
$params['iconClass'] = $data['iconClass'];
|
||||
}
|
||||
if (isset($data['fullTextSearch'])) {
|
||||
$params['fullTestSearch'] = $data['fullTextSearch'];
|
||||
}
|
||||
|
||||
$params['kanbanViewMode'] = !empty($data['kanbanViewMode']);
|
||||
if (!empty($data['kanbanStatusIgnoreList'])) {
|
||||
|
||||
@@ -403,6 +403,16 @@ class EntityManager
|
||||
$this->getMetadata()->set('entityDefs', $name, $entityDefsData);
|
||||
}
|
||||
|
||||
|
||||
if (isset($data['fullTextSearch'])) {
|
||||
$entityDefsData = [
|
||||
'collection' => [
|
||||
'fullTextSearch' => !!$data['fullTextSearch']
|
||||
]
|
||||
];
|
||||
$this->getMetadata()->set('entityDefs', $name, $entityDefsData);
|
||||
}
|
||||
|
||||
if (array_key_exists('kanbanStatusIgnoreList', $data)) {
|
||||
$scopeData['kanbanStatusIgnoreList'] = $data['kanbanStatusIgnoreList'];
|
||||
$this->getMetadata()->set('scopes', $name, $scopeData);
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
"color": "Color",
|
||||
"kanbanViewMode": "Kanban View",
|
||||
"kanbanStatusIgnoreList": "Ignored groups in Kanban view",
|
||||
"iconClass": "Icon"
|
||||
"iconClass": "Icon",
|
||||
"fullTextSearch": "Full-Text Search"
|
||||
},
|
||||
"options": {
|
||||
"type": {
|
||||
@@ -68,6 +69,7 @@
|
||||
"disabled": "Check if you don't need this entity in your system.",
|
||||
"linkAudited": "Creating related record and linking with existing record will be logged in Stream.",
|
||||
"linkMultipleField": "Link Multiple field provides a handy way to edit relations. Don't use it if you can have a large number of related records.",
|
||||
"entityType": "Base Plus - has Activities, History and Tasks panels.\n\nEvent - available in Calendar and Activities panel."
|
||||
"entityType": "Base Plus - has Activities, History and Tasks panels.\n\nEvent - available in Calendar and Activities panel.",
|
||||
"fullTextSearch": "Running rebuild required."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell form-group col-md-6" data-name="fullTextSearch">
|
||||
<label class="control-label" data-name="fullTextSearch">{{translate 'fullTextSearch' category='fields' scope='EntityManager'}}</label>
|
||||
<div class="field" data-name="fullTextSearch">
|
||||
{{{fullTextSearch}}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell form-group col-md-6" data-name="kanbanViewMode">
|
||||
<label class="control-label" data-name="kanbanViewMode">{{translate 'kanbanViewMode' category='fields' scope='EntityManager'}}</label>
|
||||
|
||||
@@ -64,7 +64,8 @@ Espo.define('views/admin/entity-manager/modals/edit-entity', ['views/modal', 'mo
|
||||
this.model.set('sortBy', this.getMetadata().get('entityDefs.' + scope + '.collection.sortBy'));
|
||||
this.model.set('sortDirection', this.getMetadata().get('entityDefs.' + scope + '.collection.asc') ? 'asc' : 'desc');
|
||||
|
||||
this.model.set('textFilterFields', this.getMetadata().get('entityDefs.' + scope + '.collection.textFilterFields') || ['name']);
|
||||
this.model.set('textFilterFields', this.getMetadata().get(['entityDefs', scope, 'collection', 'textFilterFields']) || ['name']);
|
||||
this.model.set('fullTextSearch', this.getMetadata().get(['entityDefs', scope, 'collection', 'fullTextSearch']) || false);
|
||||
|
||||
this.model.set('statusField', this.getMetadata().get('scopes.' + scope + '.statusField') || null);
|
||||
|
||||
@@ -259,6 +260,16 @@ Espo.define('views/admin/entity-manager/modals/edit-entity', ['views/modal', 'mo
|
||||
}
|
||||
});
|
||||
|
||||
this.createView('fullTextSearch', 'views/fields/bool', {
|
||||
model: model,
|
||||
mode: 'edit',
|
||||
el: this.options.el + ' .field[data-name="fullTextSearch"]',
|
||||
defs: {
|
||||
name: 'fullTextSearch'
|
||||
},
|
||||
tooltip: true
|
||||
});
|
||||
|
||||
this.createView('kanbanViewMode', 'views/fields/bool', {
|
||||
model: model,
|
||||
mode: 'edit',
|
||||
@@ -502,6 +513,7 @@ Espo.define('views/admin/entity-manager/modals/edit-entity', ['views/modal', 'mo
|
||||
stream: this.model.get('stream'),
|
||||
disabled: this.model.get('disabled'),
|
||||
textFilterFields: this.model.get('textFilterFields'),
|
||||
fullTextSearch: this.model.get('fullTextSearch'),
|
||||
statusField: this.model.get('statusField'),
|
||||
iconClass: this.model.get('iconClass')
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user