From: colemanw Date: Thu, 14 Sep 2023 13:34:27 +0000 (-0400) Subject: AdminUi - Switch to new toolbar setting for search displays X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=30facc673af089c07ec2e8a247359320c25d99c1;p=civicrm-core.git AdminUi - Switch to new toolbar setting for search displays --- diff --git a/CRM/Financial/DAO/EntityFinancialAccount.php b/CRM/Financial/DAO/EntityFinancialAccount.php index 9e7d4dfe6d..c64ef32a05 100644 --- a/CRM/Financial/DAO/EntityFinancialAccount.php +++ b/CRM/Financial/DAO/EntityFinancialAccount.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Financial/EntityFinancialAccount.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:56a06273eec47f43f5671cb6152b7747) + * (GenCodeChecksum:73bd55d66da916d2b27113d0cd8ca6f7) */ /** @@ -31,6 +31,17 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { */ public static $_log = TRUE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/admin/financial/financialType/accounts?action=add&reset=1&aid=[entity_id]', + 'update' => 'civicrm/admin/financial/financialType/accounts?action=update&id=[id]&aid=[entity_id]&reset=1', + 'delete' => 'civicrm/admin/financial/financialType/accounts?action=delete&id=[id]&aid=[entity_id]&reset=1', + ]; + /** * ID * diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_ACL_Roles.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_ACL_Roles.mgd.php index d139ac217e..bd8af2a789 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_ACL_Roles.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_ACL_Roles.mgd.php @@ -178,10 +178,15 @@ return [ FALSE, ], ], - 'addButton' => [ - 'path' => 'civicrm/acl/entityrole/edit?reset=1&action=add', - 'text' => E::ts('Add ACL Role Assignment'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'ACLEntityRole', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add ACL Role Assignment'), + 'icon' => 'fa-plus', + ], ], ], 'acl_bypass' => FALSE, diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Assigned_Financial_Accounts.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Assigned_Financial_Accounts.mgd.php index 1515549640..54401dfa35 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Assigned_Financial_Accounts.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Assigned_Financial_Accounts.mgd.php @@ -164,10 +164,15 @@ return [ FALSE, ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/financial/financialType/accounts?action=add&reset=1&aid=[entity_id]', - 'text' => E::ts('Add Assigned Account'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'EntityFinancialAccount', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Assigned Account'), + 'icon' => 'fa-plus', + ], ], ], 'acl_bypass' => FALSE, diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Contact_Types.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Contact_Types.mgd.php index af94d309c7..315d6bcc23 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Contact_Types.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Contact_Types.mgd.php @@ -145,10 +145,15 @@ return [ 'alignment' => 'text-right', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/options/subtype/edit?action=add&reset=1', - 'text' => E::ts('Add Contact Type'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'ContactType', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Contact Type'), + 'icon' => 'fa-plus', + ], ], ], 'acl_bypass' => FALSE, diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Fields.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Fields.mgd.php index b5074525f6..6d784e714b 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Fields.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Fields.mgd.php @@ -215,11 +215,16 @@ return [ FALSE, ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/custom/group/field/add?reset=1&action=add&gid=[custom_group_id]', - 'text' => E::ts('Add Custom Field'), - 'icon' => 'fa-plus', - 'autoOpen' => TRUE, + 'toolbar' => [ + [ + 'entity' => 'CustomField', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Custom Field'), + 'icon' => 'fa-plus', + 'autoOpen' => TRUE, + ], ], 'placeholder' => 5, ], diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Groups.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Groups.mgd.php index 22d01e6709..6fc669b847 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Groups.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Custom_Groups.mgd.php @@ -216,11 +216,16 @@ return [ ], ], 'placeholder' => 5, - 'addButton' => [ - 'path' => 'civicrm/admin/custom/group/edit?reset=1', - 'text' => E::ts('Add Set of Custom Fields'), - 'icon' => 'fa-plus', - 'autoOpen' => TRUE, + 'toolbar' => [ + [ + 'entity' => 'CustomGroup', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Set of Custom Fields'), + 'icon' => 'fa-plus', + 'autoOpen' => TRUE, + ], ], ], 'acl_bypass' => FALSE, diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Accounts.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Accounts.mgd.php index 87537a6719..037272055b 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Accounts.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Accounts.mgd.php @@ -188,10 +188,15 @@ return [ 'alignment' => 'text-right', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/financial/financialAccount/edit?action=add&reset=1', - 'text' => E::ts('Add Financial Account'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'FinancialAccount', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Financial Account'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Types.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Types.mgd.php index 97b14eb98e..fb1c1f5149 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Types.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Financial_Types.mgd.php @@ -194,10 +194,15 @@ return [ 'alignment' => 'text-right', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/financial/financialType/edit?reset=1&action=add', - 'text' => E::ts('Add Financial Type'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'FinancialType', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Financial Type'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Location_Types.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Location_Types.mgd.php index d0565012c8..de21d6709c 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Location_Types.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Location_Types.mgd.php @@ -172,10 +172,15 @@ return [ 'alignment' => 'text-right', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/locationType/edit?action=add&reset=1', - 'text' => E::ts('Add Location Type'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'LocationType', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Location Type'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Manage_Group.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Manage_Group.mgd.php index 66fa0460c7..989a90f3ab 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Manage_Group.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Manage_Group.mgd.php @@ -273,10 +273,15 @@ return [ 'table', 'table-striped', ], - 'addButton' => [ - 'path' => 'civicrm/group/add?reset=1', - 'text' => E::ts('Add Group'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'Group', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Group'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Payment_Processors.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Payment_Processors.mgd.php index f6a9395feb..5d77af6ea6 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Payment_Processors.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Payment_Processors.mgd.php @@ -212,10 +212,15 @@ return [ 'alignment' => 'text-right', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/paymentProcessor/edit?action=add&reset=1', - 'text' => E::ts('Add Payment Processor'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'PaymentProcessor', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Payment Processor'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_ProfileFields.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_ProfileFields.mgd.php index bda07f5c26..9e542201f1 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_ProfileFields.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_ProfileFields.mgd.php @@ -191,11 +191,16 @@ return [ ], 'draggable' => 'weight', 'button' => NULL, - 'addButton' => [ - 'path' => 'civicrm/admin/uf/group/field/add?reset=1&action=add&gid=[uf_group_id]', - 'text' => E::ts('Add Field'), - 'icon' => 'fa-plus', - 'autoOpen' => TRUE, + 'toolbar' => [ + [ + 'entity' => 'UFField', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Field'), + 'icon' => 'fa-plus', + 'autoOpen' => TRUE, + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Profiles.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Profiles.mgd.php index d0dc2982d6..a856a52108 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Profiles.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Profiles.mgd.php @@ -262,10 +262,15 @@ return [ 'label' => '', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/uf/group/add?action=add&reset=1', - 'text' => E::ts('Add Profile'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'UFGroup', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Profile'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Relationship_Types.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Relationship_Types.mgd.php index 06e1764b09..543637452e 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Relationship_Types.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Relationship_Types.mgd.php @@ -163,10 +163,15 @@ return [ 'alignment' => 'text-right', ], ], - 'addButton' => [ - 'path' => 'civicrm/admin/reltype/edit?action=add&reset=1', - 'text' => E::ts('Add Relationship Type'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'RelationshipType', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Relationship Type'), + 'icon' => 'fa-plus', + ], ], 'cssRules' => [ [ diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php index e6e3387768..899c01af35 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php @@ -187,10 +187,15 @@ return [ 'table-striped', 'crm-sticky-header', ], - 'addButton' => [ - 'path' => 'civicrm/admin/scheduleReminders/edit?reset=1&action=add', - 'text' => E::ts('Add Scheduled Reminder'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'ActionSchedule', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Scheduled Reminder'), + 'icon' => 'fa-plus', + ], ], ], 'acl_bypass' => FALSE, diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Manage_ACLs.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Manage_ACLs.mgd.php index 1138b1b1a6..22a541bf5b 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Manage_ACLs.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Manage_ACLs.mgd.php @@ -180,10 +180,15 @@ return [ 'table-striped', 'crm-sticky-header', ], - 'addButton' => [ - 'path' => 'civicrm/acl/edit?reset=1&action=add', - 'text' => E::ts('Add ACL'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'ACL', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add ACL'), + 'icon' => 'fa-plus', + ], ], ], 'acl_bypass' => FALSE, diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Manage_Mail_Accounts.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Manage_Mail_Accounts.mgd.php index 3efe2e216d..d1119fd2aa 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_Manage_Mail_Accounts.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Manage_Mail_Accounts.mgd.php @@ -178,10 +178,15 @@ return [ 'table', 'table-striped', ], - 'addButton' => [ - 'path' => 'civicrm/admin/mailSettings/edit?action=add&reset=1', - 'text' => E::ts('Add Mail Account'), - 'icon' => 'fa-plus', + 'toolbar' => [ + [ + 'entity' => 'MailSettings', + 'action' => 'add', + 'target' => 'crm-popup', + 'style' => 'primary', + 'text' => E::ts('Add Mail Account'), + 'icon' => 'fa-plus', + ], ], ], 'acl_bypass' => FALSE, diff --git a/xml/schema/Financial/EntityFinancialAccount.xml b/xml/schema/Financial/EntityFinancialAccount.xml index 580fd8cd45..8612e33f9c 100644 --- a/xml/schema/Financial/EntityFinancialAccount.xml +++ b/xml/schema/Financial/EntityFinancialAccount.xml @@ -8,6 +8,11 @@ Map between an entity and a financial account, where there is a specific relationship between the financial account and the entity, e.g. Income Account for or AR Account for true CiviContribute + + civicrm/admin/financial/financialType/accounts?action=add&reset=1&aid=[entity_id] + civicrm/admin/financial/financialType/accounts?action=update&id=[id]&aid=[entity_id]&reset=1 + civicrm/admin/financial/financialType/accounts?action=delete&id=[id]&aid=[entity_id]&reset=1 + id Entity Financial Account ID