From df01482898d1f7bec74eb8de5e44506e50184fe2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 15 Nov 2021 12:09:12 -0500 Subject: [PATCH] CiviGrant - Install extension + managed entities during upgrade Disable & delete component, install extension as either "enabled" or "disabled" depending on the status of the component. Migrate option values to managed entities Migrate navigation menu to extension managed entities --- .../Incremental/php/FiveFortySeven.php | 242 ++++++++++++++++++ .../managed/Navigation_Grants.mgd.php | 175 +++++++++++++ ...arch_options_OptionValue_CiviGrant.mgd.php | 31 +++ ...view_options_OptionValue_CiviGrant.mgd.php | 31 +++ .../managed/OptionGroup_grant_status.mgd.php | 217 ++++++++++++++++ .../managed/OptionGroup_grant_type.mgd.php | 133 ++++++++++ ...up_mapping_type_OptionValue_Export.mgd.php | 31 +++ ...OptionValue_CRM_Report_Form_Grants.mgd.php | 59 +++++ xml/templates/civicrm_data.tpl | 24 -- xml/templates/civicrm_navigation.tpl | 14 - 10 files changed, 919 insertions(+), 38 deletions(-) create mode 100644 ext/civigrant/managed/Navigation_Grants.mgd.php create mode 100644 ext/civigrant/managed/OptionGroup_advanced_search_options_OptionValue_CiviGrant.mgd.php create mode 100644 ext/civigrant/managed/OptionGroup_contact_view_options_OptionValue_CiviGrant.mgd.php create mode 100644 ext/civigrant/managed/OptionGroup_grant_status.mgd.php create mode 100644 ext/civigrant/managed/OptionGroup_grant_type.mgd.php create mode 100644 ext/civigrant/managed/OptionGroup_mapping_type_OptionValue_Export.mgd.php create mode 100644 ext/civigrant/managed/OptionGroup_report_template_OptionValue_CRM_Report_Form_Grants.mgd.php diff --git a/CRM/Upgrade/Incremental/php/FiveFortySeven.php b/CRM/Upgrade/Incremental/php/FiveFortySeven.php index 1c09908a39..cd4eb02287 100644 --- a/CRM/Upgrade/Incremental/php/FiveFortySeven.php +++ b/CRM/Upgrade/Incremental/php/FiveFortySeven.php @@ -29,6 +29,248 @@ class CRM_Upgrade_Incremental_php_FiveFortySeven extends CRM_Upgrade_Incremental */ public function upgrade_5_47_alpha1($rev): void { $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev); + $this->addTask('Migrate CiviGrant component to an extension', 'migrateCiviGrant'); + } + + /** + * @param \CRM_Queue_TaskContext $ctx + * @return bool + */ + public static function migrateCiviGrant(CRM_Queue_TaskContext $ctx): bool { + $civiGrantEnabled = in_array('CiviGrant', Civi::settings()->get('enable_components'), TRUE); + if ($civiGrantEnabled) { + CRM_Core_BAO_ConfigSetting::disableComponent('CiviGrant'); + } + $civiGrantId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Component', 'CiviGrant', 'id', 'name'); + if ($civiGrantId) { + foreach (['civicrm_menu', 'civicrm_option_value'] as $table) { + CRM_Core_DAO::executeQuery("UPDATE $table SET component_id = NULL WHERE component_id = $civiGrantId", [], TRUE, NULL, FALSE, FALSE); + } + CRM_Core_DAO::executeQuery("DELETE FROM civicrm_component WHERE name = 'CiviGrant'", [], TRUE, NULL, FALSE, FALSE); + } + $ext = new CRM_Core_DAO_Extension(); + $ext->full_name = 'civigrant'; + if (!$ext->find(TRUE)) { + $ext->type = 'module'; + $ext->name = 'CiviGrant'; + $ext->label = ts('CiviGrant'); + $ext->file = 'civigrant'; + $ext->is_active = (int) $civiGrantEnabled; + $ext->save(); + + $managedItems = [ + 'OptionGroup_advanced_search_options_OptionValue_CiviGrant' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'advanced_search_options', + 'name' => 'CiviGrant', + ], + ], + 'OptionGroup_contact_view_options_OptionValue_CiviGrant' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'contact_view_options', + 'name' => 'CiviGrant', + ], + ], + 'OptionGroup_mapping_type_OptionValue_Export Grant' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'mapping_type', + 'name' => 'Export Grant', + ], + ], + 'OptionGroup_grant_status' => [ + 'entity' => 'OptionGroup', + 'values' => [ + 'name' => 'grant_status', + ], + ], + 'OptionGroup_grant_status_OptionValue_Submitted' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Submitted', + ], + ], + 'OptionGroup_grant_status_OptionValue_Eligible' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Eligible', + ], + ], + 'OptionGroup_grant_status_OptionValue_Ineligible' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Ineligible', + ], + ], + 'OptionGroup_grant_status_OptionValue_Paid' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Paid', + ], + ], + 'OptionGroup_grant_status_OptionValue_Awaiting Information' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Awaiting Information', + ], + ], + 'OptionGroup_grant_status_OptionValue_Withdrawn' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Withdrawn', + ], + ], + 'OptionGroup_grant_status_OptionValue_Approved for Payment' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_status', + 'name' => 'Approved for Payment', + ], + ], + 'OptionGroup_grant_type' => [ + 'entity' => 'OptionGroup', + 'values' => [ + 'name' => 'grant_type', + ], + ], + 'OptionGroup_grant_type_OptionValue_Emergency' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_type', + 'name' => 'Emergency', + ], + ], + 'OptionGroup_grant_type_OptionValue_Family Support' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_type', + 'name' => 'Family Support', + ], + ], + 'OptionGroup_grant_type_OptionValue_General Protection' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_type', + 'name' => 'General Protection', + ], + ], + 'OptionGroup_grant_type_OptionValue_Impunity' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'grant_type', + 'name' => 'Impunity', + ], + ], + 'OptionGroup_report_template_OptionValue_CRM_Report_Form_Grant_Detail' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'report_template', + 'name' => 'CRM_Report_Form_Grant_Detail', + ], + ], + 'OptionGroup_report_template_OptionValue_CRM_Report_Form_Grant_Statistics' => [ + 'entity' => 'OptionValue', + 'values' => [ + 'option_group_id:name' => 'report_template', + 'name' => 'CRM_Report_Form_Grant_Statistics', + ], + ], + 'Navigation_Grants' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'Grants', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_Grants_Navigation_Dashboard' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'Dashboard', + 'url' => 'civicrm/grant?reset=1', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_Grants_Navigation_New_Grant' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'New Grant', + 'url' => 'civicrm/grant/add?reset=1&action=add&context=standalone', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_Grants_Navigation_Find_Grants' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'Find Grants', + 'url' => 'civicrm/grant/search?reset=1', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_CiviGrant' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'CiviGrant', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_CiviGrant_Navigation_Grant_Types' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'Grant Types', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_CiviGrant_Navigation_Grant_Status' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'Grant Status', + 'domain_id' => 'current_domain', + ], + ], + 'Navigation_Grants_Navigation_Grant_Reports' => [ + 'entity' => 'Navigation', + 'values' => [ + 'name' => 'Grant Reports', + 'domain_id' => 'current_domain', + ], + ], + ]; + // Create an entry in civicrm_managed for each existing record that will be managed by the extension + foreach ($managedItems as $name => $item) { + $params = ['checkPermissions' => FALSE]; + foreach ($item['values'] as $k => $v) { + $params['where'][] = [$k, '=', $v]; + } + $record = civicrm_api4($item['entity'], 'get', $params)->first(); + if ($record) { + $mgd = new CRM_Core_DAO_Managed(); + $mgd->name = $name; + $mgd->module = 'civigrant'; + $mgd->entity_type = $item['entity']; + if (!$mgd->find(TRUE)) { + $mgd->entity_id = $record['id']; + $mgd->cleanup = 'unused'; + $mgd->save(); + } + // Disable record if CiviGrant disabled + if (!$civiGrantEnabled && !empty($record['is_active'])) { + civicrm_api4($item['entity'], 'update', [ + 'checkPermissions' => FALSE, + 'values' => ['id' => $record['id'], 'is_active' => FALSE], + ]); + } + } + } + } + return TRUE; } } diff --git a/ext/civigrant/managed/Navigation_Grants.mgd.php b/ext/civigrant/managed/Navigation_Grants.mgd.php new file mode 100644 index 0000000000..fe1d40e93d --- /dev/null +++ b/ext/civigrant/managed/Navigation_Grants.mgd.php @@ -0,0 +1,175 @@ + 'Navigation_Grants', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'Grants', + 'name' => 'Grants', + 'url' => NULL, + 'icon' => 'crm-i fa-money', + 'permission' => 'access CiviGrant', + 'permission_operator' => '', + 'is_active' => TRUE, + 'weight' => 90, + 'parent_id' => NULL, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_Grants_Navigation_Dashboard', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'Dashboard', + 'name' => 'Dashboard', + 'url' => 'civicrm/grant?reset=1', + 'icon' => NULL, + 'permission' => 'access CiviGrant', + 'permission_operator' => '', + 'parent_id.name' => 'Grants', + 'is_active' => TRUE, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_Grants_Navigation_New_Grant', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'New Grant', + 'name' => 'New Grant', + 'url' => 'civicrm/grant/add?reset=1&action=add&context=standalone', + 'icon' => NULL, + 'permission' => 'access CiviGrant,edit grants', + 'permission_operator' => 'AND', + 'parent_id.name' => 'Grants', + 'is_active' => TRUE, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_Grants_Navigation_Find_Grants', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'Find Grants', + 'name' => 'Find Grants', + 'url' => 'civicrm/grant/search?reset=1', + 'icon' => NULL, + 'permission' => 'access CiviGrant', + 'permission_operator' => '', + 'parent_id.name' => 'Grants', + 'is_active' => TRUE, + 'has_separator' => '1', + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_CiviGrant', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'CiviGrant', + 'name' => 'CiviGrant', + 'url' => NULL, + 'icon' => NULL, + 'permission' => 'access CiviGrant,administer CiviCRM', + 'permission_operator' => 'AND', + 'parent_id.name' => 'Administer', + 'is_active' => TRUE, + 'weight' => 13, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_CiviGrant_Navigation_Grant_Types', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'Grant Types', + 'name' => 'Grant Types', + 'url' => 'civicrm/admin/options/grant_type?reset=1', + 'icon' => NULL, + 'permission' => 'access CiviGrant,administer CiviCRM', + 'permission_operator' => 'AND', + 'parent_id.name' => 'CiviGrant', + 'is_active' => TRUE, + 'weight' => 1, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_CiviGrant_Navigation_Grant_Status', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'Grant Status', + 'name' => 'Grant Status', + 'url' => 'civicrm/admin/options/grant_status?reset=1', + 'icon' => NULL, + 'permission' => 'access CiviGrant,administer CiviCRM', + 'permission_operator' => 'AND', + 'parent_id.name' => 'CiviGrant', + 'is_active' => TRUE, + 'weight' => 2, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'Navigation_Grants_Navigation_Grant_Reports', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'label' => 'Grant Reports', + 'name' => 'Grant Reports', + 'url' => 'civicrm/report/list?compid=5&reset=1', + 'icon' => NULL, + 'permission' => 'access CiviGrant', + 'permission_operator' => '', + 'parent_id.name' => 'Grants', + 'is_active' => TRUE, + 'has_separator' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], +]; diff --git a/ext/civigrant/managed/OptionGroup_advanced_search_options_OptionValue_CiviGrant.mgd.php b/ext/civigrant/managed/OptionGroup_advanced_search_options_OptionValue_CiviGrant.mgd.php new file mode 100644 index 0000000000..757d2d9342 --- /dev/null +++ b/ext/civigrant/managed/OptionGroup_advanced_search_options_OptionValue_CiviGrant.mgd.php @@ -0,0 +1,31 @@ + 'OptionGroup_advanced_search_options_OptionValue_CiviGrant', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'advanced_search_options', + 'label' => 'Grants', + 'value' => '12', + 'name' => 'CiviGrant', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 14, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], +]; diff --git a/ext/civigrant/managed/OptionGroup_contact_view_options_OptionValue_CiviGrant.mgd.php b/ext/civigrant/managed/OptionGroup_contact_view_options_OptionValue_CiviGrant.mgd.php new file mode 100644 index 0000000000..0458ec905b --- /dev/null +++ b/ext/civigrant/managed/OptionGroup_contact_view_options_OptionValue_CiviGrant.mgd.php @@ -0,0 +1,31 @@ + 'OptionGroup_contact_view_options_OptionValue_CiviGrant', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'contact_view_options', + 'label' => 'Grants', + 'value' => '11', + 'name' => 'CiviGrant', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 11, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], +]; diff --git a/ext/civigrant/managed/OptionGroup_grant_status.mgd.php b/ext/civigrant/managed/OptionGroup_grant_status.mgd.php new file mode 100644 index 0000000000..2ebab03245 --- /dev/null +++ b/ext/civigrant/managed/OptionGroup_grant_status.mgd.php @@ -0,0 +1,217 @@ + 'OptionGroup_grant_status', + 'entity' => 'OptionGroup', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'grant_status', + 'title' => 'Grant status', + 'description' => NULL, + 'data_type' => NULL, + 'is_reserved' => TRUE, + 'is_active' => TRUE, + 'is_locked' => FALSE, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Submitted', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Submitted', + 'value' => '1', + 'name' => 'Submitted', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => TRUE, + 'weight' => 1, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Eligible', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Eligible', + 'value' => '2', + 'name' => 'Eligible', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 2, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Ineligible', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Ineligible', + 'value' => '3', + 'name' => 'Ineligible', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 3, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Paid', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Paid', + 'value' => '4', + 'name' => 'Paid', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 4, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Awaiting Information', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Awaiting Information', + 'value' => '5', + 'name' => 'Awaiting Information', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 5, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Withdrawn', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Withdrawn', + 'value' => '6', + 'name' => 'Withdrawn', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 6, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_status_OptionValue_Approved for Payment', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_status', + 'label' => 'Approved for Payment', + 'value' => '7', + 'name' => 'Approved for Payment', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 7, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], +]; diff --git a/ext/civigrant/managed/OptionGroup_grant_type.mgd.php b/ext/civigrant/managed/OptionGroup_grant_type.mgd.php new file mode 100644 index 0000000000..8c98381b9a --- /dev/null +++ b/ext/civigrant/managed/OptionGroup_grant_type.mgd.php @@ -0,0 +1,133 @@ + 'OptionGroup_grant_type', + 'entity' => 'OptionGroup', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'grant_type', + 'title' => 'Grant Type', + 'description' => NULL, + 'data_type' => NULL, + 'is_reserved' => TRUE, + 'is_active' => TRUE, + 'is_locked' => FALSE, + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_type_OptionValue_Emergency', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_type', + 'label' => 'Emergency', + 'value' => '1', + 'name' => 'Emergency', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => TRUE, + 'weight' => 1, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'visibility_id' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_type_OptionValue_Family Support', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_type', + 'label' => 'Family Support', + 'value' => '2', + 'name' => 'Family Support', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 2, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'visibility_id' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_type_OptionValue_General Protection', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_type', + 'label' => 'General Protection', + 'value' => '3', + 'name' => 'General Protection', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 3, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'visibility_id' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], + [ + 'name' => 'OptionGroup_grant_type_OptionValue_Impunity', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'grant_type', + 'label' => 'Impunity', + 'value' => '4', + 'name' => 'Impunity', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 4, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'visibility_id' => NULL, + 'domain_id' => 'current_domain', + ], + ], + ], +]; diff --git a/ext/civigrant/managed/OptionGroup_mapping_type_OptionValue_Export.mgd.php b/ext/civigrant/managed/OptionGroup_mapping_type_OptionValue_Export.mgd.php new file mode 100644 index 0000000000..33532b150c --- /dev/null +++ b/ext/civigrant/managed/OptionGroup_mapping_type_OptionValue_Export.mgd.php @@ -0,0 +1,31 @@ + 'OptionGroup_mapping_type_OptionValue_Export Grant', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'mapping_type', + 'label' => 'Export Grant', + 'value' => '13', + 'name' => 'Export Grant', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 13, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => TRUE, + 'is_active' => TRUE, + 'icon' => NULL, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], +]; diff --git a/ext/civigrant/managed/OptionGroup_report_template_OptionValue_CRM_Report_Form_Grants.mgd.php b/ext/civigrant/managed/OptionGroup_report_template_OptionValue_CRM_Report_Form_Grants.mgd.php new file mode 100644 index 0000000000..ed7a5367e4 --- /dev/null +++ b/ext/civigrant/managed/OptionGroup_report_template_OptionValue_CRM_Report_Form_Grants.mgd.php @@ -0,0 +1,59 @@ + 'OptionGroup_report_template_OptionValue_CRM_Report_Form_Grant_Detail', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'report_template', + 'label' => 'Grant Report (Detail)', + 'value' => 'grant/detail', + 'name' => 'CRM_Report_Form_Grant_Detail', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 30, + 'description' => 'Grant Report Detail', + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'component_id' => NULL, + 'icon' => NULL, + 'color' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], + [ + 'name' => 'OptionGroup_report_template_OptionValue_CRM_Report_Form_Grant_Statistics', + 'entity' => 'OptionValue', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'report_template', + 'label' => 'Grant Report (Statistics)', + 'value' => 'grant/statistics', + 'name' => 'CRM_Report_Form_Grant_Statistics', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'weight' => 42, + 'description' => 'Shows statistics for Grants.', + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'component_id' => NULL, + 'icon' => NULL, + 'color' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + ], + ], +]; diff --git a/xml/templates/civicrm_data.tpl b/xml/templates/civicrm_data.tpl index 632a0e22a2..12349708e6 100644 --- a/xml/templates/civicrm_data.tpl +++ b/xml/templates/civicrm_data.tpl @@ -143,8 +143,6 @@ VALUES ('user_dashboard_options' , '{ts escape="sql"}User Dashboard Options{/ts}' , NULL, 1, 1, 1), ('address_options' , '{ts escape="sql"}Addressing Options{/ts}' , NULL, 1, 1, 0), ('group_type' , '{ts escape="sql"}Group Type{/ts}' , NULL, 1, 1, 0), - ('grant_status' , '{ts escape="sql"}Grant status{/ts}' , NULL, 1, 1, 0), - ('grant_type' , '{ts escape="sql"}Grant Type{/ts}' , NULL, 1, 1, 0), ('custom_search' , '{ts escape="sql"}Custom Search{/ts}' , NULL, 1, 1, 0), ('activity_status' , '{ts escape="sql"}Activity Status{/ts}' , 'Integer', 1, 1, 0), ('case_type' , '{ts escape="sql"}Case Type{/ts}' , NULL, 1, 1, 0), @@ -229,8 +227,6 @@ SELECT @option_group_id_asOpt := max(id) from civicrm_option_group wher SELECT @option_group_id_udOpt := max(id) from civicrm_option_group where name = 'user_dashboard_options'; SELECT @option_group_id_adOpt := max(id) from civicrm_option_group where name = 'address_options'; SELECT @option_group_id_gType := max(id) from civicrm_option_group where name = 'group_type'; -SELECT @option_group_id_grantSt := max(id) from civicrm_option_group where name = 'grant_status'; -SELECT @option_group_id_grantTyp := max(id) from civicrm_option_group where name = 'grant_type'; SELECT @option_group_id_csearch := max(id) from civicrm_option_group where name = 'custom_search'; SELECT @option_group_id_acs := max(id) from civicrm_option_group where name = 'activity_status'; SELECT @option_group_id_ct := max(id) from civicrm_option_group where name = 'case_type'; @@ -297,7 +293,6 @@ SELECT @eventCompId := max(id) FROM civicrm_component where name = 'CiviEve SELECT @memberCompId := max(id) FROM civicrm_component where name = 'CiviMember'; SELECT @pledgeCompId := max(id) FROM civicrm_component where name = 'CiviPledge'; SELECT @caseCompId := max(id) FROM civicrm_component where name = 'CiviCase'; -SELECT @grantCompId := max(id) FROM civicrm_component where name = 'CiviGrant'; SELECT @campaignCompId := max(id) FROM civicrm_component where name = 'CiviCampaign'; SELECT @mailCompId := max(id) FROM civicrm_component where name = 'CiviMail'; @@ -475,7 +470,6 @@ VALUES (@option_group_id_cvOpt, '{ts escape="sql"}Memberships{/ts}' , 8, 'CiviMember', NULL, 0, NULL, 8, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_cvOpt, '{ts escape="sql"}Events{/ts}' , 9, 'CiviEvent', NULL, 0, NULL, 9, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_cvOpt, '{ts escape="sql"}Cases{/ts}' , 10, 'CiviCase', NULL, 0, NULL, 10, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_cvOpt, '{ts escape="sql"}Grants{/ts}' , 11, 'CiviGrant', NULL, 0, NULL, 11, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_cvOpt, '{ts escape="sql"}Pledges{/ts}' , 13, 'CiviPledge', NULL, 0, NULL, 13, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_cvOpt, '{ts escape="sql"}Mailings{/ts}' , 14, 'CiviMail', NULL, 0, NULL, 14, NULL, 0, 0, 1, NULL, NULL, NULL), @@ -512,7 +506,6 @@ VALUES (@option_group_id_asOpt, '{ts escape="sql"}Memberships{/ts}' , 8, 'CiviMember', NULL, 0, NULL, 9, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_asOpt, '{ts escape="sql"}Events{/ts}' , 9, 'CiviEvent', NULL, 0, NULL, 10, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_asOpt, '{ts escape="sql"}Cases{/ts}' , 10, 'CiviCase', NULL, 0, NULL, 11, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_asOpt, 'Grants' , 12, 'CiviGrant', NULL, 0, NULL, 14, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_asOpt, '{ts escape="sql"}Demographics{/ts}' , 13, 'demographics', NULL, 0, NULL, 15, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_asOpt, '{ts escape="sql"}Pledges{/ts}' , 15, 'CiviPledge', NULL, 0, NULL, 17, NULL, 0, 0, 1, NULL, NULL, NULL), (@option_group_id_asOpt, '{ts escape="sql"}Contact Type{/ts}' , 16, 'contactType', NULL, 0, NULL, 18, NULL, 0, 0, 1, NULL, NULL, NULL), @@ -564,14 +557,6 @@ VALUES (@option_group_id_gType, '{ts escape="sql"}Access Control{/ts}', 1, 'Access Control', NULL, 0, NULL, 1, NULL, 0, 1, 1, NULL, NULL, NULL), (@option_group_id_gType, '{ts escape="sql"}Mailing List{/ts}', 2, 'Mailing List', NULL, 0, NULL, 2, NULL, 0, 1, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Submitted{/ts}', 1, 'Submitted', NULL, 0, 1, 1, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Eligible{/ts}', 2, 'Eligible', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Ineligible{/ts}', 3, 'Ineligible', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Paid{/ts}', 4, 'Paid', NULL, 0, NULL, 4, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Awaiting Information{/ts}', 5, 'Awaiting Information', NULL, 0, NULL, 5, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Withdrawn{/ts}', 6, 'Withdrawn', NULL, 0, NULL, 6, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_grantSt, '{ts escape="sql"}Approved for Payment{/ts}', 7, 'Approved for Payment', NULL, 0, NULL, 7, NULL, 0, 0, 1, NULL, NULL, NULL), - (@option_group_id_csearch , 'CRM_Contact_Form_Search_Custom_Sample' , 1, 'CRM_Contact_Form_Search_Custom_Sample' , NULL, 0, NULL, 1, '{ts escape="sql"}Household Name and State{/ts}', 0, 0, 1, NULL, NULL, NULL), (@option_group_id_csearch , 'CRM_Contact_Form_Search_Custom_ContributionAggregate', 2, 'CRM_Contact_Form_Search_Custom_ContributionAggregate', NULL, 0, NULL, 2, '{ts escape="sql"}Contribution Aggregate{/ts}', 0, 0, 1, NULL, NULL, NULL), (@option_group_id_csearch , 'CRM_Contact_Form_Search_Custom_Group' , 4, 'CRM_Contact_Form_Search_Custom_Group' , NULL, 0, NULL, 4, '{ts escape="sql"}Include / Exclude Search{/ts}', 0, 0, 1, NULL, NULL, NULL), @@ -617,7 +602,6 @@ VALUES (@option_group_id_report , '{ts escape="sql"}Database Log Report{/ts}', 'contact/log', 'CRM_Report_Form_Contact_Log', NULL, 0, NULL, 27, '{ts escape="sql"}Log of contact and activity records created or updated in a given date range.{/ts}', 0, 0, 1, NULL, NULL, NULL), (@option_group_id_report , '{ts escape="sql"}Activity Summary Report{/ts}', 'activitySummary', 'CRM_Report_Form_ActivitySummary', NULL, 0, NULL, 28, '{ts escape="sql"}Shows activity statistics by type / date{/ts}', 0, 0, 1, NULL, NULL, NULL), (@option_group_id_report, '{ts escape="sql"}Bookkeeping Transactions Report{/ts}', 'contribute/bookkeeping', 'CRM_Report_Form_Contribute_Bookkeeping', NULL, 0, 0, 29, '{ts escape="sql"}Shows Bookkeeping Transactions Report{/ts}', 0, 0, 1, 2, NULL, NULL), - (@option_group_id_report , {localize}'{ts escape="sql"}Grant Report (Detail){/ts}'{/localize}, 'grant/detail', 'CRM_Report_Form_Grant_Detail', NULL, 0, 0, 30, {localize}'{ts escape="sql"}Grant Report Detail{/ts}'{/localize}, 0, 0, 1, @grantCompId, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Participant list Count Report{/ts}'{/localize}, 'event/participantlist', 'CRM_Report_Form_Event_ParticipantListCount', NULL, 0, 0, 31, {localize}'{ts escape="sql"}Shows the Participant list with Participant Count.{/ts}'{/localize}, 0, 0, 1, @eventCompId, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Income Count Summary Report{/ts}'{/localize}, 'event/incomesummary', 'CRM_Report_Form_Event_IncomeCountSummary', NULL, 0, 0, 32, {localize}'{ts escape="sql"}Shows the Income Summary of events with Count.{/ts}'{/localize}, 0, 0, 1, @eventCompId, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Case Detail Report{/ts}'{/localize}, 'case/detail', 'CRM_Report_Form_Case_Detail', NULL, 0, 0, 33, {localize}'{ts escape="sql"}Case Details{/ts}'{/localize}, 0, 0, 1, @caseCompId, NULL, NULL), @@ -627,7 +611,6 @@ VALUES (@option_group_id_report, {localize}'{ts escape="sql"}Mail Click-Through Report{/ts}'{/localize}, 'Mailing/clicks', 'CRM_Report_Form_Mailing_Clicks', NULL, 0, NULL, 37, {localize}'{ts escape="sql"}Display clicks from each mailing{/ts}'{/localize}, 0, 0, 1, @mailCompId, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Contact Logging Report (Summary){/ts}'{/localize}, 'logging/contact/summary', 'CRM_Report_Form_Contact_LoggingSummary', NULL, 0, NULL, 38, {localize}'{ts escape="sql"}Contact modification report for the logging infrastructure (summary).{/ts}'{/localize}, 0, 0, 0, NULL, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Contact Logging Report (Detail){/ts}'{/localize}, 'logging/contact/detail', 'CRM_Report_Form_Contact_LoggingDetail', NULL, 0, NULL, 39, {localize}'{ts escape="sql"}Contact modification report for the logging infrastructure (detail).{/ts}'{/localize}, 0, 0, 0, NULL, NULL, NULL), - (@option_group_id_report, {localize}'{ts escape="sql"}Grant Report (Statistics){/ts}'{/localize}, 'grant/statistics', 'CRM_Report_Form_Grant_Statistics', NULL, 0, NULL, 42, {localize}'{ts escape="sql"}Shows statistics for Grants.{/ts}'{/localize}, 0, 0, 1, @grantCompId, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Survey Report (Detail){/ts}'{/localize}, 'survey/detail', 'CRM_Report_Form_Campaign_SurveyDetails', NULL, 0, NULL, 43, {localize}'{ts escape="sql"}Detailed report for canvassing, phone-banking, walk lists or other surveys.{/ts}'{/localize}, 0, 0, 1, @campaignCompId, NULL, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Personal Campaign Page Report{/ts}'{/localize}, 'contribute/pcp', 'CRM_Report_Form_Contribute_PCP', NULL, 0, NULL, 44, {localize}'{ts escape="sql"}Summarizes amount raised and number of contributors for each Personal Campaign Page.{/ts}'{/localize}, 0, 0, 1, @contributeCompId, NULL, NULL), (@option_group_id_report , {localize}'{ts escape="sql"}Pledge Summary Report{/ts}'{/localize}, 'pledge/summary', 'CRM_Report_Form_Pledge_Summary', NULL, 0, NULL, 45, {localize}'{ts escape="sql"}Groups and totals pledges by criteria including contact, time period, pledge status, location, etc.{/ts}'{/localize}, 0, 0, 1, @pledgeCompId, NULL, NULL), @@ -687,7 +670,6 @@ VALUES (@option_group_id_mt, '{ts escape="sql"}Export Participant{/ts}', 10, 'Export Participant', NULL, 0, 0, 10, NULL, 0, 1, 1, NULL, NULL, NULL), (@option_group_id_mt, '{ts escape="sql"}Export Pledge{/ts}', 11, 'Export Pledge', NULL, 0, 0, 11, NULL, 0, 1, 1, NULL, NULL, NULL), (@option_group_id_mt, '{ts escape="sql"}Export Case{/ts}', 12, 'Export Case', NULL, 0, 0, 12, NULL, 0, 1, 1, NULL, NULL, NULL), - (@option_group_id_mt, '{ts escape="sql"}Export Grant{/ts}', 13, 'Export Grant', NULL, 0, 0, 13, NULL, 0, 1, 1, NULL, NULL, NULL), (@option_group_id_mt, '{ts escape="sql"}Export Activity{/ts}', 14, 'Export Activity', NULL, 0, 0, 14, NULL, 0, 1, 1, NULL, NULL, NULL), (@option_group_id_fu, '{ts escape="sql"}day{/ts}' , 'day' , 'day', NULL, 0, NULL, 1, NULL, 0, 1, 1, NULL, NULL, NULL), @@ -1108,12 +1090,6 @@ VALUES -- from email address. (@option_group_id_fma, '"FIXME" ', '1', '"FIXME" ', NULL, 0, 1, 1, '{ts escape="sql"}Default domain email address and from name.{/ts}', 0, 0, 1, NULL, @domainID, NULL ), --- grant types - (@option_group_id_grantTyp, '{ts escape="sql"}Emergency{/ts}' , 1, 'Emergency' , NULL, 0, 1, 1, NULL, 0, 0, 1, NULL, @domainID, NULL), - (@option_group_id_grantTyp, '{ts escape="sql"}Family Support{/ts}' , 2, 'Family Support' , NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, @domainID, NULL), - (@option_group_id_grantTyp, '{ts escape="sql"}General Protection{/ts}' , 3, 'General Protection', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, @domainID, NULL), - (@option_group_id_grantTyp, '{ts escape="sql"}Impunity{/ts}' , 4, 'Impunity' , NULL, 0, NULL, 4, NULL, 0, 0, 1, NULL, @domainID, NULL), - -- Mail Approval Status Preferences (@option_group_id_mail_approval_status, '{ts escape="sql"}Approved{/ts}' , 1, 'Approved', NULL, 0, 1, 1, NULL, 0, 1, 1, @mailCompId, @domainID, NULL), (@option_group_id_mail_approval_status, '{ts escape="sql"}Rejected{/ts}' , 2, 'Rejected', NULL, 0, 0, 2, NULL, 0, 1, 1, @mailCompId, @domainID, NULL), diff --git a/xml/templates/civicrm_navigation.tpl b/xml/templates/civicrm_navigation.tpl index b6098f865c..d1aa26eba5 100644 --- a/xml/templates/civicrm_navigation.tpl +++ b/xml/templates/civicrm_navigation.tpl @@ -249,20 +249,6 @@ VALUES ( @domainID, 'civicrm/case/search?reset=1', '{ts escape="sql" skip="true"}Find Cases{/ts}', 'Find Cases', 'access my cases and activities,access all cases and activities', 'OR', @caselastID, '1', 1, 3 ), ( @domainID, 'civicrm/report/list?compid=7&reset=1', '{ts escape="sql" skip="true"}Case Reports{/ts}', 'Case Reports', 'access my cases and activities,access all cases and activities,administer CiviCase', 'OR', @caselastID, '1', 0, 4 ); -INSERT INTO civicrm_navigation - ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight, icon ) -VALUES - ( @domainID, NULL, '{ts escape="sql" skip="true"}Grants{/ts}', 'Grants', 'access CiviGrant', '', NULL, '1', NULL, 90, 'crm-i fa-money' ); - -SET @grantlastID:=LAST_INSERT_ID(); -INSERT INTO civicrm_navigation - ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES - ( @domainID, 'civicrm/grant?reset=1', '{ts escape="sql" skip="true"}Dashboard{/ts}', 'Dashboard', 'access CiviGrant', '', @grantlastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/grant/add?reset=1&action=add&context=standalone', '{ts escape="sql" skip="true"}New Grant{/ts}', 'New Grant', 'access CiviGrant,edit grants', 'AND', @grantlastID, '1', NULL, 2 ), - ( @domainID, 'civicrm/grant/search?reset=1', '{ts escape="sql" skip="true"}Find Grants{/ts}', 'Find Grants', 'access CiviGrant', '', @grantlastID, '1', 1, 3 ), - ( @domainID, 'civicrm/report/list?compid=5&reset=1', '{ts escape="sql" skip="true"}Grant Reports{/ts}', 'Grant Reports', 'access CiviGrant', '', @grantlastID, '1', 0, 4 ); - INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight, icon ) VALUES -- 2.25.1