new: [encryption key] view added

- was missing, despite links to it
pull/85/head
iglocska 2022-01-17 09:45:45 +01:00
parent 9e2c29660d
commit 12d7607aae
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 50 additions and 0 deletions

View File

@ -130,4 +130,16 @@ class EncryptionKeysController extends AppController
$this->set('metaGroup', 'ContactDB');
$this->render('add');
}
public function view($id = false)
{
$this->CRUD->view($id, [
'contain' => ['Individuals', 'Organisations']
]);
$responsePayload = $this->CRUD->getResponsePayload();
if (!empty($responsePayload)) {
return $responsePayload;
}
$this->set('metaGroup', 'ContactDB');
}
}

View File

@ -0,0 +1,32 @@
<?php
echo $this->element(
'/genericElements/SingleViews/single_view',
[
'data' => $entity,
'fields' => [
[
'key' => __('ID'),
'path' => 'id'
],
[
'key' => __('Type'),
'path' => 'type'
],
[
'key' => __('Owner'),
'path' => 'owner_id',
'owner_model_path' => 'owner_model',
'type' => 'owner'
],
[
'key' => __('Revoked'),
'path' => 'revoked'
],
[
'key' => __('Key'),
'path' => 'encryption_key'
]
]
]
);

View File

@ -0,0 +1,6 @@
<?php
echo $this->element('/genericElements/IndexTable/Fields/owner', [
'field' => $field,
'row' => $data
]);
?>