CRM-17176 - Improve confirm message for clean-up reports menu task. Fix bug in naviga...
authorDave Greenberg <dave@civicrm.org>
Thu, 12 Nov 2015 00:23:29 +0000 (16:23 -0800)
committerDave Greenberg <dave@civicrm.org>
Thu, 12 Nov 2015 00:23:29 +0000 (16:23 -0800)
----------------------------------------
* CRM-17176: Add api action to reset reports menu
  https://issues.civicrm.org/jira/browse/CRM-17176

api/v3/Navigation.php
templates/CRM/Admin/Page/Navigation.tpl

index e47b5636da83bc51929efca6a6629dab7800bc1c..e920e81d2280f3eb059c43c03da7690fe58405fa 100644 (file)
@@ -60,9 +60,9 @@ function _civicrm_api3_navigation_reset_spec(&$params) {
  */
 function civicrm_api3_navigation_reset($params) {
   if ($params['for'] == 'report') {
-    CRM_Core_BAO_Navigation::resetNavigation();
+    CRM_Core_BAO_Navigation::rebuildReportsNavigation($params['domain_id']);
   }
-  CRM_Core_BAO_Navigation::rebuildReportsNavigation($params['domain_id']);
+  CRM_Core_BAO_Navigation::resetNavigation();
   return civicrm_api3_create_success(1, $params, 'navigation', 'reset');
 }
 
index 7399bdeaccf5cdcc003445d8a6e237a9c2b0f10f..1c0ce8646a61049938a17cb00dacf23540a1fa6a 100644 (file)
         e.preventDefault();
         CRM.confirm({
           title: $(this).text(),
-          message: '{/literal}{ts escape='js'}This will rebuild the "Reports" menu to include all currently active reports.{/ts}{literal}'
+          message: '{/literal}{ts escape='js'}This will add links for all currently active reports to the "Reports" menu under the relevant component. If you have added report instances to other menus, they will be moved to "Reports".  Are you sure?{/ts}{literal}'
         })
           .on('crmConfirm:yes', function() {
             $('#crm-container').block();