diff --git a/src/Controller/Component/ACLComponent.php b/src/Controller/Component/ACLComponent.php index eec94ce..55c2161 100644 --- a/src/Controller/Component/ACLComponent.php +++ b/src/Controller/Component/ACLComponent.php @@ -662,6 +662,11 @@ class ACLComponent extends Component 'actions' => ['delete', 'edit', 'view'], 'skipTopMenu' => 1, 'popup' => 1 + ], + 'listProcessors' => [ + 'url' => '/inbox/listProcessors', + 'label' => __('List Request Processors'), + 'skipTopMenu' => 1 ] ] ], diff --git a/src/Controller/InboxController.php b/src/Controller/InboxController.php index 6c0f978..8997529 100644 --- a/src/Controller/InboxController.php +++ b/src/Controller/InboxController.php @@ -105,27 +105,13 @@ class InboxController extends AppController $data[] = [ 'enabled' => $processor->enabled, 'scope' => $scope, - 'action' => $processor->action + 'action' => $processor->action, + 'description' => isset($processor->getDescription) ? $processor->getDescription() : null, + 'notice' => $processor->notice ?? null, + 'error' => $processor->error ?? null, ]; } } - $this->set('title', 'Available request processors'); - $this->set('fields', [ - [ - 'name' => 'Enabled', - 'data_path' => 'enabled', - 'element' => 'boolean' - ], - [ - 'name' => 'Processor scope', - 'data_path' => 'scope', - ], - [ - 'name' => 'Processor action', - 'data_path' => 'action', - ] - ]); $this->set('data', $data); - $this->render('/genericTemplates/index_simple'); } } diff --git a/templates/Inbox/list_processors.php b/templates/Inbox/list_processors.php new file mode 100644 index 0000000..fd93199 --- /dev/null +++ b/templates/Inbox/list_processors.php @@ -0,0 +1,54 @@ +element('genericElements/IndexTable/index_table', [ + 'data' => [ + 'skip_pagination' => true, + 'data' => $data, + 'top_bar' => [ + 'children' => [ + [ + 'type' => 'context_filters', + 'context_filters' => !empty($filteringContexts) ? $filteringContexts : [] + ], + [ + 'type' => 'search', + 'button' => __('Filter'), + 'placeholder' => __('Enter value to search'), + 'data' => '', + 'searchKey' => 'value', + 'allowFilering' => true + ] + ] + ], + 'fields' => [ + [ + 'name' => __('Enabled'), + 'data_path' => 'enabled', + 'element' => 'boolean' + ], + [ + 'name' => __('Processor scope'), + 'data_path' => 'scope', + ], + [ + 'name' => __('Processor action'), + 'data_path' => 'action', + ], + [ + 'name' => __('Description'), + 'data_path' => 'description', + ], + [ + 'name' => __('Notice'), + 'data_path' => 'notice', + ], + [ + 'name' => __('Error'), + 'data_path' => 'error', + ], + ], + 'title' => __('Available Inbox Request Processors'), + 'description' => __('The list of Inbox Request Processors available on this server.'), + 'actions' => [ + ] + ] +]); \ No newline at end of file