chg: [organisation:index] Removed ENISA-specific quick filters
But kept them as develop documentation...pull/121/head
parent
f8af692122
commit
31750da7c9
|
@ -20,46 +20,48 @@ class OrganisationsController extends AppController
|
|||
|
||||
public function index()
|
||||
{
|
||||
$customContextFilters = [
|
||||
// [
|
||||
// 'label' => __('ENISA Accredited'),
|
||||
// 'filterCondition' => [
|
||||
// 'MetaFields.field' => 'enisa-tistatus',
|
||||
// 'MetaFields.value' => 'Accredited',
|
||||
// 'MetaFields.MetaTemplates.name' => 'ENISA CSIRT Network'
|
||||
// ]
|
||||
// ],
|
||||
// [
|
||||
// 'label' => __('ENISA not-Accredited'),
|
||||
// 'filterCondition' => [
|
||||
// 'MetaFields.field' => 'enisa-tistatus',
|
||||
// 'MetaFields.value !=' => 'Accredited',
|
||||
// 'MetaFields.MetaTemplates.name' => 'ENISA CSIRT Network'
|
||||
// ]
|
||||
// ],
|
||||
// [
|
||||
// 'label' => __('ENISA CSIRT Network (GOV)'),
|
||||
// 'filterConditionFunction' => function ($query) {
|
||||
// return $this->CRUD->setParentConditionsForMetaFields($query, [
|
||||
// 'ENISA CSIRT Network' => [
|
||||
// [
|
||||
// 'field' => 'constituency',
|
||||
// 'value LIKE' => '%Government%',
|
||||
// ],
|
||||
// [
|
||||
// 'field' => 'csirt-network-status',
|
||||
// 'value' => 'Member',
|
||||
// ],
|
||||
// ]
|
||||
// ]);
|
||||
// }
|
||||
// ],
|
||||
];
|
||||
|
||||
$this->CRUD->index([
|
||||
'filters' => $this->filterFields,
|
||||
'quickFilters' => $this->quickFilterFields,
|
||||
'quickFilterForMetaField' => ['enabled' => true, 'wildcard_search' => true],
|
||||
'contextFilters' => [
|
||||
'custom' => [
|
||||
[
|
||||
'label' => __('ENISA Accredited'),
|
||||
'filterCondition' => [
|
||||
'MetaFields.field' => 'enisa-tistatus',
|
||||
'MetaFields.value' => 'Accredited',
|
||||
'MetaFields.MetaTemplates.name' => 'ENISA CSIRT Network'
|
||||
]
|
||||
],
|
||||
[
|
||||
'label' => __('ENISA not-Accredited'),
|
||||
'filterCondition' => [
|
||||
'MetaFields.field' => 'enisa-tistatus',
|
||||
'MetaFields.value !=' => 'Accredited',
|
||||
'MetaFields.MetaTemplates.name' => 'ENISA CSIRT Network'
|
||||
]
|
||||
],
|
||||
[
|
||||
'label' => __('ENISA CSIRT Network (GOV)'),
|
||||
'filterConditionFunction' => function($query) {
|
||||
return $this->CRUD->setParentConditionsForMetaFields($query, [
|
||||
'ENISA CSIRT Network' => [
|
||||
[
|
||||
'field' => 'constituency',
|
||||
'value LIKE' => '%Government%',
|
||||
],
|
||||
[
|
||||
'field' => 'csirt-network-status',
|
||||
'value' => 'Member',
|
||||
],
|
||||
]
|
||||
]);
|
||||
}
|
||||
]
|
||||
],
|
||||
'custom' => $customContextFilters,
|
||||
],
|
||||
'contain' => $this->containFields,
|
||||
'statisticsFields' => $this->statisticsFields,
|
||||
|
|
Loading…
Reference in New Issue