From 701a87b9d3f5decf48dd5775d336b549ff92527f Mon Sep 17 00:00:00 2001
From: Dave Hall <dave.hall@skwashd.com>
Date: Mon, 13 Jan 2014 16:11:49 +1100
Subject: [PATCH] Issue #1247748 by skwashd: Move admin to
 admin/config/services/harvest

---
 harvest.info                                       |  5 ++++-
 harvest.module                                     |  6 +++---
 harvest_notifications/harvest_notifications.info   |  5 ++++-
 harvest_notifications/harvest_notifications.module | 10 +++++-----
 harvest_projects/harvest_projects.admin.inc        | 18 +++++++++---------
 harvest_projects/harvest_projects.info             |  5 ++++-
 harvest_projects/harvest_projects.module           | 12 ++++++------
 harvest_status/harvest_status.info                 |  5 ++++-
 harvest_status/harvest_status.module               |  4 ++--
 9 files changed, 41 insertions(+), 29 deletions(-)

diff --git a/harvest.info b/harvest.info
index f7e5fa2..d36b3e3 100644
--- a/harvest.info
+++ b/harvest.info
@@ -3,6 +3,9 @@ description = "Provides a link between Drupal and the harvest API."
 version = 7.x-1.0
 core = 7.x
 package = Harvest
+
+configure = admin/config/services/harvest
+
 files[] = harvest.module
 files[] = harvest.admin.inc
 files[] = harvest.install
@@ -49,4 +52,4 @@ files[] = views/projects/harvest_handler_projects_field.inc
 files[] = views/statistics/harvest_handler_statistics_field.inc
 
 ; Views tasks handlers
-files[] = views/tasks/harvest_handler_tasks_field.inc
\ No newline at end of file
+files[] = views/tasks/harvest_handler_tasks_field.inc
diff --git a/harvest.module b/harvest.module
index 56b3e59..75b71cd 100644
--- a/harvest.module
+++ b/harvest.module
@@ -8,7 +8,7 @@
  * Implements hook_menu().
  */
 function harvest_menu() {
-  $items['admin/harvest'] = array(
+  $items['admin/config/services/harvest'] = array(
     'title' => 'Harvest',
     'description' => 'Administer harvest specific settings.',
     'page callback' => 'system_admin_menu_block_page',
@@ -18,7 +18,7 @@ function harvest_menu() {
     'file' => 'system.admin.inc',
     'file path' => drupal_get_path('module', 'system'),
   );
-  $items['admin/harvest/api'] = array(
+  $items['admin/config/services/harvest/api'] = array(
     'title' => 'API settings',
     'description' => 'Configure harvest account settings and cache life.',
     'page callback' => 'drupal_get_form',
@@ -217,4 +217,4 @@ function harvest_views_api() {
   return array(
     'api' => 3,
   );
-}
\ No newline at end of file
+}
diff --git a/harvest_notifications/harvest_notifications.info b/harvest_notifications/harvest_notifications.info
index 19832d0..da9d0a6 100644
--- a/harvest_notifications/harvest_notifications.info
+++ b/harvest_notifications/harvest_notifications.info
@@ -6,6 +6,9 @@ package = Harvest
 dependencies[] = harvest
 dependencies[] = harvest_projects
 dependencies[] = token
+
+configure = admin/config/services/harvest/notifications
+
 files[] = harvest_notifications.admin.inc
 files[] = harvest_notifications.module
-files[] = harvest_notifications.test
\ No newline at end of file
+files[] = harvest_notifications.test
diff --git a/harvest_notifications/harvest_notifications.module b/harvest_notifications/harvest_notifications.module
index 43bed9e..4b0b8f4 100644
--- a/harvest_notifications/harvest_notifications.module
+++ b/harvest_notifications/harvest_notifications.module
@@ -35,7 +35,7 @@ function harvest_notifications_theme() {
 function harvest_notifications_menu() {
   $items = array();
 
-  $items['admin/harvest/notifications'] = array(
+  $items['admin/config/services/harvest/notifications'] = array(
     'title' => 'Notifications',
     'description' => 'Configure notification settings and templates.',
     'page callback' => 'drupal_get_form',
@@ -44,13 +44,13 @@ function harvest_notifications_menu() {
     'file' => 'harvest_notifications.admin.inc',
   );
 
-  $items['admin/harvest/notifications/general'] = array(
+  $items['admin/config/services/harvest/notifications/general'] = array(
     'title' => 'General settings',
     'access arguments' => array('administer site configuration'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
 
-  $items['admin/harvest/notifications/timezones'] = array(
+  $items['admin/config/services/harvest/notifications/timezones'] = array(
     'title' => 'Timezone settings',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('harvest_notifications_timezones_form'),
@@ -58,7 +58,7 @@ function harvest_notifications_menu() {
     'file' => 'harvest_notifications.admin.inc',
     'type' => MENU_LOCAL_TASK,
   );
-  $items['admin/harvest/notifications/test'] = array(
+  $items['admin/config/services/harvest/notifications/test'] = array(
     'title' => 'Test',
     'page callback' => '_harvest_notifications_test',
     'access arguments' => array('administer site configuration'),
@@ -550,4 +550,4 @@ function harvest_notifications_report() {
       variable_set('harvest_notifications_report_lastsend', $sendon_timestamp);
     }
   }
-}
\ No newline at end of file
+}
diff --git a/harvest_projects/harvest_projects.admin.inc b/harvest_projects/harvest_projects.admin.inc
index 54bb9ca..a2fb262 100644
--- a/harvest_projects/harvest_projects.admin.inc
+++ b/harvest_projects/harvest_projects.admin.inc
@@ -77,7 +77,7 @@ function harvest_projects_categories_form() {
     );
   }
   else {
-    drupal_set_message(t('There are no existing categories, you can now:') . ' ' . l(t('add one'), 'admin/harvest/categories/add'), 'warning');
+    drupal_set_message(t('There are no existing categories, you can now:') . ' ' . l(t('add one'), 'admin/config/services/harvest/categories/add'), 'warning');
   }
 
   return $form;
@@ -110,7 +110,7 @@ function theme_harvest_projects_categories_form(&$variables) {
         render($form['name'][$cid]),
         drupal_strlen(trim(render($form['description'][$cid]))) ? t('Yes') : t('No'),
         render($form['billable'][$cid]) ? t('Yes') : t('No'),
-        l(t('Edit'), "admin/harvest/categories/edit/$cid") . ', ' . l(t('Delete'), "admin/harvest/categories/delete/$cid"),
+        l(t('Edit'), "admin/config/services/harvest/categories/edit/$cid") . ', ' . l(t('Delete'), "admin/config/services/harvest/categories/delete/$cid"),
         render($form['weight'][$cid]),
       ),
       'class' => array('draggable'),
@@ -137,7 +137,7 @@ function harvest_projects_category_form($form, &$form_state, $cid = NULL) {
     $category = harvest_projects_get_categories($cid);
     if (empty($category->name)) {
       drupal_set_message(t("Sorry, the category requested doesn't seem to exist."));
-      drupal_goto('admin/harvest/categories');
+      drupal_goto('admin/config/services/harvest/categories');
     }
   }
 
@@ -181,7 +181,7 @@ function harvest_projects_category_form($form, &$form_state, $cid = NULL) {
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save category'),
-    '#suffix' => l(t('Cancel'), 'admin/harvest/categories'),
+    '#suffix' => l(t('Cancel'), 'admin/config/services/harvest/categories'),
   );
   return $form;
 }
@@ -191,7 +191,7 @@ function harvest_projects_category_form($form, &$form_state, $cid = NULL) {
  */
 function harvest_projects_category_form_submit(&$form, $form_state) {
   harvest_projects_save_category($form_state['values']['cid'], $form_state['values']['name'], $form_state['values']['roles'], $form_state['values']['description'], $form_state['values']['billable'], $form_state['values']['weight']);
-  $form['#redirect'] = 'admin/harvest/categories';
+  $form['#redirect'] = 'admin/config/services/harvest/categories';
 }
 
 /**
@@ -201,13 +201,13 @@ function harvest_projects_delete_category_form($form_state, $cid) {
   $category = harvest_projects_get_categories($cid);
   if (empty($category->name)) {
     drupal_set_message(t("Sorry, the category requested doesn't seem to exist."));
-    drupal_goto('admin/harvest/categories');
+    drupal_goto('admin/config/services/harvest/categories');
   }
   $form['cid'] = array(
     '#type' => 'hidden',
     '#value' => $cid,
   );
-  return confirm_form($form, t("Are you sure you want to delete the '%category' category?", array('%category' => $category->name)), 'admin/harvest/categories', NULL, t('Delete'));
+  return confirm_form($form, t("Are you sure you want to delete the '%category' category?", array('%category' => $category->name)), 'admin/config/services/harvest/categories', NULL, t('Delete'));
 }
 
 /**
@@ -215,7 +215,7 @@ function harvest_projects_delete_category_form($form_state, $cid) {
  */
 function harvest_projects_delete_category_form_submit(&$form, $form_state) {
   harvest_projects_delete_category($form_state['values']['cid']);
-  $form['#redirect'] = 'admin/harvest/categories';
+  $form['#redirect'] = 'admin/config/services/harvest/categories';
 }
 
 /**
@@ -345,4 +345,4 @@ function theme_harvest_projects_tasks_form($variables) {
   // Build the final output of the form.
   $output .= drupal_render_children($form);
   return $output;
-}
\ No newline at end of file
+}
diff --git a/harvest_projects/harvest_projects.info b/harvest_projects/harvest_projects.info
index 45bc7d7..c062879 100644
--- a/harvest_projects/harvest_projects.info
+++ b/harvest_projects/harvest_projects.info
@@ -4,6 +4,9 @@ version = 7.x-1.0
 core = 7.x
 package = Harvest
 dependencies[] = harvest
+
+configure = admin/config/services/harvest/projects
+
 files[] = harvest_projects.admin.inc
 files[] = harvest_projects.install
-files[] = harvest_projects.module
\ No newline at end of file
+files[] = harvest_projects.module
diff --git a/harvest_projects/harvest_projects.module b/harvest_projects/harvest_projects.module
index 7d9d309..66bf054 100644
--- a/harvest_projects/harvest_projects.module
+++ b/harvest_projects/harvest_projects.module
@@ -77,7 +77,7 @@ function harvest_projects_init() {
  * Implements hook_menu().
  */
 function harvest_projects_menu() {
-  $items['admin/harvest/projects'] = array(
+  $items['admin/config/services/harvest/projects'] = array(
     'title' => 'Project settings',
     'description' => 'Configure harvest project settings.',
     'page callback' => 'drupal_get_form',
@@ -85,7 +85,7 @@ function harvest_projects_menu() {
     'access arguments' => array('administer harvest projects'),
     'file' => 'harvest_projects.admin.inc',
   );
-  $items['admin/harvest/categories'] = array(
+  $items['admin/config/services/harvest/categories'] = array(
     'title' => 'Task categories',
     'description' => 'Manage organizational task categories.',
     'page callback' => 'drupal_get_form',
@@ -93,12 +93,12 @@ function harvest_projects_menu() {
     'access arguments' => array('administer harvest projects'),
     'file' => 'harvest_projects.admin.inc',
   );
-  $items['admin/harvest/categories/list'] = array(
+  $items['admin/config/services/harvest/categories/list'] = array(
     'title' => 'List',
     'weight' => -1,
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
-  $items['admin/harvest/categories/add'] = array(
+  $items['admin/config/services/harvest/categories/add'] = array(
     'title' => 'Add category',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('harvest_projects_category_form'),
@@ -106,7 +106,7 @@ function harvest_projects_menu() {
     'file' => 'harvest_projects.admin.inc',
     'type' => MENU_LOCAL_TASK,
   );
-  $items['admin/harvest/categories/edit/%'] = array(
+  $items['admin/config/services/harvest/categories/edit/%'] = array(
     'title' => 'Edit category',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('harvest_projects_category_form', 4),
@@ -114,7 +114,7 @@ function harvest_projects_menu() {
     'file' => 'harvest_projects.admin.inc',
     'type' => MENU_CALLBACK,
   );
-  $items['admin/harvest/categories/delete/%'] = array(
+  $items['admin/config/services/harvest/categories/delete/%'] = array(
     'title' => 'Delete category',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('harvest_projects_delete_category_form', 4),
diff --git a/harvest_status/harvest_status.info b/harvest_status/harvest_status.info
index 0d3ca63..4025639 100644
--- a/harvest_status/harvest_status.info
+++ b/harvest_status/harvest_status.info
@@ -6,4 +6,7 @@ core = 7.x
 package = Harvest
 dependencies[] = harvest
 dependencies[] = harvest_projects
-files[] = harvest_status.module
\ No newline at end of file
+
+configure = admin/config/services/harvest/status
+
+files[] = harvest_status.module
diff --git a/harvest_status/harvest_status.module b/harvest_status/harvest_status.module
index 705f7f1..408118e 100644
--- a/harvest_status/harvest_status.module
+++ b/harvest_status/harvest_status.module
@@ -18,7 +18,7 @@ function harvest_status_init() {
  */
 function harvest_status_menu() {
   // administration page
-  $items['admin/harvest/status'] = array(
+  $items['admin/config/services/harvest/status'] = array(
     'title' => 'Harvest Status settings',
     'description' => 'Select users to be included in the Harvest Status block',
     'page callback' => 'drupal_get_form',
@@ -181,4 +181,4 @@ function theme_harvest_status_format_day_entry($variables) {
   $output .= '<div class="harvest-project">' . $day_entry['client'] . ' - ';
   $output .= $day_entry['project'] . '</div> ';
   return '<div class="day-entry">' . $output . '</div>';
-}
\ No newline at end of file
+}
-- 
1.8.4.3

