From 5ba487da55c02e63e08a576f0f949b07c667ee60 Mon Sep 17 00:00:00 2001 From: 19ATF72 Date: Mon, 4 Dec 2023 11:11:21 -0800 Subject: [PATCH] Add searchkit and afform display --- ...eadersFootersAndAutomatedMessages.aff.html | 3 + ...HeadersFootersAndAutomatedMessages.aff.php | 14 ++ ...ers_Footers_and_Automated_Messages.mgd.php | 220 ++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.html create mode 100644 ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.php create mode 100644 ext/civicrm_admin_ui/managed/SavedSearch_Headers_Footers_and_Automated_Messages.mgd.php diff --git a/ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.html b/ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.html new file mode 100644 index 0000000000..e4208fb697 --- /dev/null +++ b/ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.php b/ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.php new file mode 100644 index 0000000000..0fc31c7885 --- /dev/null +++ b/ext/civicrm_admin_ui/ang/afsearchHeadersFootersAndAutomatedMessages.aff.php @@ -0,0 +1,14 @@ + 'search', + 'title' => E::ts('Headers, Footers, and Automated Messages'), + 'icon' => 'fa-list-alt', + 'server_route' => 'civicrm/admin/component', + 'permission' => [ + 'access CiviCRM', + 'access CiviMail', + ], + 'modified_date' => '2023-12-04 10:53:21', +]; diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Headers_Footers_and_Automated_Messages.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Headers_Footers_and_Automated_Messages.mgd.php new file mode 100644 index 0000000000..efa3d7005f --- /dev/null +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Headers_Footers_and_Automated_Messages.mgd.php @@ -0,0 +1,220 @@ + 'SavedSearch_Headers_Footers_and_Automated_Messages', + 'entity' => 'SavedSearch', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'Headers_Footers_and_Automated_Messages', + 'label' => E::ts('Headers, Footers, and Automated Messages'), + 'api_entity' => 'MailingComponent', + 'api_params' => [ + 'version' => 4, + 'select' => [ + 'name', + 'component_type:label', + 'subject', + 'body_html', + 'body_text', + 'is_default', + 'is_active', + ], + 'orderBy' => [], + 'where' => [], + 'groupBy' => [], + 'join' => [], + 'having' => [], + ], + ], + 'match' => [ + 'name', + ], + ], + ], + [ + 'name' => 'SavedSearch_Headers_Footers_and_Automated_Messages_SearchDisplay_Headers_Footers_and_Automated_Messages_Table_1', + 'entity' => 'SearchDisplay', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'Headers_Footers_and_Automated_Messages_Table_1', + 'label' => E::ts('Headers, Footers, and Automated Messages'), + 'saved_search_id.name' => 'Headers_Footers_and_Automated_Messages', + 'type' => 'table', + 'settings' => [ + 'description' => NULL, + 'sort' => [ + [ + 'component_type', + 'ASC', + ], + ], + 'limit' => 50, + 'pager' => [], + 'placeholder' => 5, + 'columns' => [ + [ + 'type' => 'field', + 'key' => 'name', + 'dataType' => 'String', + 'label' => E::ts('Name'), + 'sortable' => FALSE, + 'editable' => TRUE, + ], + [ + 'type' => 'field', + 'key' => 'component_type:label', + 'dataType' => 'String', + 'label' => E::ts('Type'), + 'sortable' => FALSE, + ], + [ + 'type' => 'field', + 'key' => 'subject', + 'dataType' => 'String', + 'label' => E::ts('Subject'), + 'sortable' => FALSE, + ], + [ + 'type' => 'field', + 'key' => 'body_html', + 'dataType' => 'Text', + 'label' => E::ts('Body HTML'), + 'sortable' => FALSE, + ], + [ + 'type' => 'field', + 'key' => 'body_text', + 'dataType' => 'Text', + 'label' => E::ts('Body Text'), + 'sortable' => FALSE, + ], + [ + 'type' => 'field', + 'key' => 'is_default', + 'dataType' => 'Boolean', + 'label' => E::ts('Default?'), + 'sortable' => FALSE, + 'rewrite' => '[none]', + 'title' => NULL, + 'icons' => [ + [ + 'icon' => 'fa-check', + 'side' => 'left', + 'if' => [ + 'is_default', + '=', + TRUE, + ], + ], + ], + ], + [ + 'type' => 'field', + 'key' => 'is_active', + 'dataType' => 'Boolean', + 'label' => E::ts('Enabled?'), + 'sortable' => FALSE, + 'icons' => [], + 'rewrite' => '', + ], + [ + 'links' => [ + [ + 'entity' => 'MailingComponent', + 'action' => 'update', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => '', + 'text' => E::ts('Edit'), + 'style' => 'default', + 'path' => '', + 'task' => '', + 'condition' => [], + ], + [ + 'task' => 'disable', + 'entity' => 'MailingComponent', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => '', + 'text' => E::ts('Disable'), + 'style' => 'default', + 'path' => '', + 'action' => '', + 'condition' => [ + 'is_active', + '=', + TRUE, + ], + ], + [ + 'task' => 'enable', + 'entity' => 'MailingComponent', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => '', + 'text' => E::ts('Enable'), + 'style' => 'default', + 'path' => '', + 'action' => '', + 'condition' => [ + 'is_active', + '=', + FALSE, + ], + ], + ], + 'type' => 'links', + 'alignment' => 'text-right', + ], + ], + 'actions' => FALSE, + 'classes' => [ + 'table-striped', + 'table', + ], + 'toolbar' => [ + [ + 'action' => 'add', + 'entity' => 'MailingComponent', + 'text' => E::ts('Add Mailing Component'), + 'icon' => 'fa-plus', + 'style' => 'primary', + 'target' => 'crm-popup', + 'join' => '', + 'path' => '', + 'task' => '', + 'condition' => [ + 'check user permission', + '=', + [ + 'access CiviMail', + ], + ], + ], + ], + 'cssRules' => [ + [ + 'disabled', + 'is_active', + '=', + FALSE, + ], + ], + ], + ], + 'match' => [ + 'saved_search_id', + 'name', + ], + ], + ], +]; -- 2.25.1