Skip to content

Person canvas add/edit modal forms (CFM-249) #88

Merged
merged 18 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9e5974b
Provide modal add/edit for person canvas vuejs components (CFM-249)
arlen Apr 4, 2023
862fdf8
Post-rebase cleanup to ensure Add menu works with vue components and …
arlen Apr 5, 2023
039a28b
Set MVEAs to redirect to "self" (CFM-249)
arlen Apr 5, 2023
53da87b
Set MVEAs to default to the "iframe" layout (CFM-249)
arlen Apr 7, 2023
36acf39
Hide secondary subnavigation on Person Canvas (CFM-249)
arlen Apr 7, 2023
578e328
Trival cleanup of deprecated code and comments (CFM-249)
arlen Apr 7, 2023
6edffcc
Ensure Groups subnavigation doesn't complain of missing variables (CF…
arlen Apr 7, 2023
81aab8c
Move MVEA canvas attributes into fields-nav.inc. Rename canvas from "…
arlen Apr 12, 2023
dfac6c1
Move MVEA Canvas below standard edit form. Make the canvas available …
arlen Apr 26, 2023
ee97f54
Clean up External Id subnavigation (CFM-249)
arlen Apr 27, 2023
93c0d2f
Add MVEA Canvas to Person Roles (CFM-249)
arlen Apr 27, 2023
a753417
Stylistic cleanup (CFM-249)
arlen Apr 27, 2023
e3de546
First pass for cleanup and simplification of subnavigation and titles…
arlen Apr 27, 2023
fe907a0
Fix conflicting modal dialog ID (CFM-249)
arlen Apr 27, 2023
5dabf5c
Turn off global person canvas Actions menu (CFM-249)
arlen Apr 27, 2023
0438848
Remove rowActions no longer needed for the Person pages (CFM-249)
arlen Apr 27, 2023
993c1b2
Enable ESC from within iframe to hide the MVEA modal window (CFM-249)
arlen Apr 30, 2023
ea36e63
Provide a default title for the MVEA modal window (CFM-249)
arlen May 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/resources/locales/en_US/information.po
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ msgstr "Active, Cannot Be Disabled"
msgid "plugin.inactive"
msgstr "Inactive"

msgid "global.attribute.modal"
msgstr "Attribute Modal"

msgid "global.attributes"
msgstr "Attributes"

msgid "global.records.none"
msgstr "There are no records to display."

Expand Down
3 changes: 0 additions & 3 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@

# Menu Messages

msgid "co.Attributes"
msgstr "Attributes"

msgid "co.configuration"
msgstr "Configuration"

Expand Down
5 changes: 5 additions & 0 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ public function beforeRender(\Cake\Event\EventInterface $event) {
}

$this->set('vv_template_path', $vv_template_path);

// Check to see if the model names a specific layout
if(method_exists($table, "getLayout")) {
$this->viewBuilder()->setLayout($table->getLayout());
}

return parent::beforeRender($event);
}
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/AdHocAttributesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ class AdHocAttributesTable extends Table {
use \App\Lib\Traits\ValidationTrait;
use \App\Lib\Traits\SearchFilterTrait;

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/AddressesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ class AddressesTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/EmailAddressesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ class EmailAddressesTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
7 changes: 4 additions & 3 deletions app/src/Model/Table/ExternalIdentitiesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ public function initialize(array $config): void {
// XXX does some of this stuff really belong in the controller?
$this->setEditContains([
'PrimaryName',
/* 'Addresses',
'Addresses',
'AdHocAttributes',
'EmailAddresses',
'Identifiers',
'Names',
'PersonRoles',
//'ExternalIdentityRoles',
'Pronouns',
'TelephoneNumbers',
'Urls'*/
'Urls'
]);
$this->setIndexContains(['PrimaryName']);

Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/IdentifiersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ class IdentifiersTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/NamesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,26 @@ class NamesTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
3 changes: 2 additions & 1 deletion app/src/Model/Table/PeopleTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ public function initialize(array $config): void {
'EmailAddresses',
'Identifiers',
'Names',
'PersonRoles',
//'PersonRoles',
'Pronouns',
'TelephoneNumbers',
'Urls'
]);
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/PronounsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ class PronounsTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/TelephoneNumbersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ class TelephoneNumbersTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/UrlsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ class UrlsTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions app/src/View/Helper/VueHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class VueHelper extends Helper {
'information' => [
'global.value.none',
'datepicker.hour'
],
'operation' => [
'close'
]
];

Expand Down
70 changes: 70 additions & 0 deletions app/templates/ExternalIdentities/fields-nav.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

// List the MVEAs that may be shown on the mveaCanvas
// When this array exists, the mveaCanvas.php element will render
$mveas = [
'names',
'email_addresses',
'identifiers',
'ad_hoc_attributes',
'addresses',
'telephone_numbers',
'urls',
'pronouns'
];

// Name the MVEAs Entity Type
$mveasEntityType = "external_identity";

// XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of this file into fields.inc
$topLinks = [
[
Expand All @@ -42,6 +58,60 @@ $topLinks = [
]
];

// $addMenuLinks is also given slightly different treatment from the typical $topLinks found in most views:
// it is a page-global menu used for adding MVEAs and is given special treatment in element/mveaCanvas.php.
$addMenuLinks = [
[
'controller' => 'names',
'action' => 'add',
'icon' => 'account_box',
'iconClass' => 'material-icons-outlined'
],
[
'controller' => 'email_addresses',
'action' => 'add',
'icon' => 'email',
'iconClass' => 'material-icons-outlined'
],
[
'controller' => 'identifiers',
'action' => 'add',
'icon' => 'fingerprint'
],
[
'controller' => 'ad_hoc_attributes',
'action' => 'add',
'icon' => 'check_box',
'iconClass' => 'material-icons-outlined'
],
[
'controller' => 'addresses',
'action' => 'add',
'icon' => 'contact_mail',
'iconClass' => 'material-icons-outlined'
],
[
'controller' => 'history_records',
'action' => 'add',
'icon' => 'history'
],
[
'controller' => 'pronouns',
'action' => 'add',
'icon' => 'transgender'
],
[
'controller' => 'telephone_numbers',
'action' => 'add',
'icon' => 'phone'
],
[
'controller' => 'urls',
'action' => 'add',
'icon' => 'link'
]
];

$subnav = [
'name' => 'person',
'active' => 'external_identities',
Expand Down
Loading