? .svn
? includes/.svn
? plugins/.svn
? plugins/tasks
? plugins/content_types/.svn
? plugins_og/.svn
? plugins_og/content_types/.svn
? plugins_workflow/.svn
? plugins_workflow/content_types/.svn
? workflow_plugins/.svn
? workflow_plugins/content_types/.svn
Index: total_control.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/total_control.info,v
retrieving revision 1.5
diff -u -p -r1.5 total_control.info
--- total_control.info	25 May 2009 22:07:18 -0000	1.5
+++ total_control.info	10 Aug 2009 02:15:34 -0000
@@ -3,8 +3,8 @@ name = Total Control
 description = Total Control Administration Dashboard
 dependencies[] = panels
 dependencies[] = views_content
-dependencies[] = delegator
+dependencies[] = page_manager
 dependencies[] = search
 dependencies[] = statistics
 package = Administration
-core = 6.x
\ No newline at end of file
+core = 6.x
Index: total_control.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/total_control.install,v
retrieving revision 1.1
diff -u -p -r1.1 total_control.install
--- total_control.install	29 Apr 2009 07:09:46 -0000	1.1
+++ total_control.install	10 Aug 2009 02:15:34 -0000
@@ -44,26 +44,5 @@ function total_control_requirements($pha
     }
   }
   
-  // Handle runtime
-  if ($phase == 'runtime') {
-    // Verify that the dashboard has been installed.
-    delegator_get_tasks();
-    $cache = delegator_page_get_page_cache(TOTAL_CONTROL_DASHBOARD_PANEL_NAME);
-    if (!isset($cache) || !isset($cache->pid)) {
-      if ($panels_major < 3) {
-        $requirements['dashboard'] = array(
-          'title' => $t('Total Control Dashboard'),
-          'description' => t(
-            'The Total Control dashboard has not been installed. Click !install to install.',
-            array(
-              '!install' => l('here', 'admin/dashboard/install'),
-            )
-          ),
-          'severity' => REQUIREMENT_ERROR
-        );
-      }
-    }
-  }
-
   return $requirements;
 }
Index: total_control.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/total_control.module,v
retrieving revision 1.14
diff -u -p -r1.14 total_control.module
--- total_control.module	9 Jul 2009 01:38:33 -0000	1.14
+++ total_control.module	10 Aug 2009 02:15:35 -0000
@@ -2,15 +2,26 @@
 // default views for Total Control
 include_once('includes/total_control.views.inc');
 
-// This is the name of the dashboard as the delegate module sees it via the page task.
+// This is the name of the dashboard as the page manager module sees it via the page task.
 define('TOTAL_CONTROL_DASHBOARD_PANEL_NAME', 'dashboard');
 
+/**
+ * Implementation of hook_ctools_plugin_api()
+ *
+ * Needed so that our other hooks are picked up.
+ */
+function total_control_ctools_plugin_api($module, $api) {
+  if ($module == 'page_manager' && $api == 'pages_default') {
+    return array('version' => 1);
+  }  
+}
+
 /* 
  * Implementation of hook_perm
  * adds permissions for access to the total control dashboard
  */
 function total_control_perm() {
- return array('have total control', 'administer total control');
+  return array('have total control', 'administer total control');
 }
 
 /* 
@@ -19,13 +30,7 @@ function total_control_perm() {
  */
 function total_control_menu() {
   $items = array();
-  
-  $items['admin/dashboard/install'] = array(
-    'title' => 'Total Control Dashboard Install',
-    'page callback' => 'total_control_dashboard_install',
-    'access arguments' => array('administer site configuration'),
-    'type' => MENU_CALLBACK,
-  );
+
   $items['admin/settings/total_control'] = array(
     'title' => 'Total Control',
     'description' => 'Adjust administration menu settings.',
@@ -37,18 +42,139 @@ function total_control_menu() {
   return $items;
 }
 
-/* menu callback */
-function total_control_dashboard_install() {
-  // Install the dashboard
-  _total_control_install_dashboard();
-  
-  // Set message saying what we did
-  drupal_set_message(t('The Total Control Dashboard was installed.'));
-  
-  // Redirect to status report
-  drupal_goto('admin/reports/status');
+/**
+ * Implementation of hook_default_page_manager_handlers()
+ */
+function total_control_default_page_manager_handlers() {
+  $handler = new stdClass;
+  $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
+  $handler->api_version = 1;
+  $handler->name = 'total_control_panel_context';
+  $handler->task = 'dashboard';
+  $handler->subtask = '';
+  $handler->handler = 'panel_context';
+  $handler->weight = 0;
+  $handler->conf = array(
+    'title' => 'Total Control Dashboard',
+    'no_blocks' => FALSE,
+    'css_id' => '',
+    'css' => '',
+    'contexts' => array(),
+    'relationships' => array(),
+  );
+  $display = new panels_display;
+  $display->layout = 'twocol_stacked';
+  $display->layout_settings = array();
+  $display->panel_settings = array();
+  $display->cache = array();
+  $display->title = '';
+  $display->hide_title = FALSE;
+  $display->content = array();
+  $display->panels = array();
+  $pane = new stdClass;
+  $pane->pid = 'new-1';
+  $pane->panel = 'left';
+  $pane->type = 'create';
+  $pane->subtype = 'create';
+  $pane->shown = TRUE;
+  $pane->access = array();
+  $pane->configuration = array(
+  );
+  $pane->cache = array();
+  $pane->style = array();
+  $pane->css = array();
+  $pane->extras = array();
+  $pane->position = 0;
+  $display->content['new-1'] = $pane;
+  $display->panels['left'][0] = 'new-1';
+  $pane = new stdClass;
+  $pane->pid = 'new-2';
+  $pane->panel = 'left';
+  $pane->type = 'taxonomy';
+  $pane->subtype = 'taxonomy';
+  $pane->shown = TRUE;
+  $pane->access = array();
+  $pane->configuration = array(
+  );
+  $pane->cache = array();
+  $pane->style = array();
+  $pane->css = array();
+  $pane->extras = array();
+  $pane->position = 1;
+  $display->content['new-2'] = $pane;
+  $display->panels['left'][1] = 'new-2';
+  $pane = new stdClass;
+  $pane->pid = 'new-3';
+  $pane->panel = 'left';
+  $pane->type = 'overview_content';
+  $pane->subtype = 'overview_content';
+  $pane->shown = TRUE;
+  $pane->access = array();
+  $pane->configuration = array(
+  );
+  $pane->cache = array();
+  $pane->style = array();
+  $pane->css = array();
+  $pane->extras = array();
+  $pane->position = 2;
+  $display->content['new-3'] = $pane;
+  $display->panels['left'][2] = 'new-3';
+  $pane = new stdClass;
+  $pane->pid = 'new-4';
+  $pane->panel = 'right';
+  $pane->type = 'views_panes';
+  $pane->subtype = 'control_content-panel_pane_1';
+  $pane->shown = TRUE;
+  $pane->access = array();
+  $pane->configuration = array(
+    'items_per_page' => '5',
+  );
+  $pane->cache = array();
+  $pane->style = array();
+  $pane->css = array();
+  $pane->extras = array();
+  $pane->position = 0;
+  $display->content['new-4'] = $pane;
+  $display->panels['right'][0] = 'new-4';
+  $pane = new stdClass;
+  $pane->pid = 'new-5';
+  $pane->panel = 'right';
+  $pane->type = 'views_panes';
+  $pane->subtype = 'control_users-panel_pane_1';
+  $pane->shown = TRUE;
+  $pane->access = array();
+  $pane->configuration = array(
+    'items_per_page' => '5',
+  );
+  $pane->cache = array();
+  $pane->style = array();
+  $pane->css = array();
+  $pane->extras = array();
+  $pane->position = 1;
+  $display->content['new-5'] = $pane;
+  $display->panels['right'][1] = 'new-5';
+  $pane = new stdClass;
+  $pane->pid = 'new-6';
+  $pane->panel = 'top';
+  $pane->type = 'welcome';
+  $pane->subtype = 'welcome';
+  $pane->shown = TRUE;
+  $pane->access = array();
+  $pane->configuration = array();
+  $pane->cache = array();
+  $pane->style = array();
+  $pane->css = array();
+  $pane->extras = array();
+  $pane->position = 0;
+  $display->content['new-6'] = $pane;
+  $display->panels['top'][0] = 'new-6';
+  $handler->conf['display'] = $display;
+  $handlers[$handler->name] = $handler;
+
+  return $handlers;
 }
 
+
 /* menu callback */
 function total_control_admin_settings(){
   $form['total_control_configure_links'] = array(
@@ -57,14 +183,6 @@ function total_control_admin_settings(){
     '#default_value' => variable_get('total_control_configure_links', 1),
     '#description' => t('Configure links go to the edit content type pages'),
     );
-  /* TODO ??
-  $form['total_control_takeover'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Take over the /admin page'),
-    '#default_value' => variable_get('total_control_takeover', 1),
-    '#description' => t('If you want the admin dashboard to appear at /admin instead of /admin/dashboard'),
-    );
-  */
   return system_settings_form($form);
 }
 
@@ -73,17 +191,13 @@ function total_control_admin_settings(){
  * we implement task and task_handler plugins.
  */
 function total_control_ctools_plugin_directory($module, $plugin) {
-  if ($module == 'ctools') {
-    return 'plugins/' . $plugin;
-  }
+  return 'plugins/' . $plugin;
 }
 
 /**
  * Implementation of hook_init().
  */
 function total_control_init() {
-  // We do this here since it should be after all required modules are enabled.
-  _total_control_attempt_install_dashboard(TRUE);
 }
 
 /* 
@@ -141,68 +255,6 @@ function _total_control_views_delete_dis
   return;
 }
 
-/**
- * Helper function
- * helps install the dashboard page, panel, and panes
- */
-function _total_control_attempt_install_dashboard($silent = FALSE) {
-  // See if required modules are available so we can install the dashboard right away
-  if (function_exists('delegator_get_tasks')) {
-    _total_control_install_dashboard();
-  }
-  // Else, we need to give the user a message with a link to install the dashboard
-  else {
-    if (!$silent) {
-      drupal_set_message(
-        t(
-          'The Total Control module has been enabled, but was unable to verify if the dashboard was installed correctly. Please check the !status_report.',
-          array(
-            '!status_report' => l(t('Status Report'), 'admin/reports/status'),
-          ),
-          'error'
-        )
-      );
-    }
-  }
-}
-
-/**
- * Helper function based on the delegator page import form:
- * delegator/plugins/tasks/page.admin.inc: delegator_page_import_subtask()
- */
-function _total_control_install_dashboard() {
-  // Make sure we haven't already imported the total control dashboard panel
-  delegator_get_tasks();
-  $cache = delegator_page_get_page_cache(TOTAL_CONTROL_DASHBOARD_PANEL_NAME);
-  if (isset($cache) && isset($cache->pid)) {
-    return FALSE;
-  }
-
-  // Load up the page
-  include(drupal_get_path('module', 'total_control') .'/includes/total_control.page.inc');
-
-  // Make sure the page object is readable
-  if (!isset($page) || !is_object($page)) {
-    return FALSE;
-  }
-
-  // Set some needed flags (Are these needed if we skip the intermediate edit step import uses?)
-  ctools_include('export');
-  $page->export_type = EXPORT_IN_DATABASE;
-  $page->type = t('Normal');
-  $page->import = TRUE;
-
-  // Save the page
-  delegator_page_save($page);
-  
-  // Clear the cache
-  delegator_page_clear_page_cache(TOTAL_CONTROL_DASHBOARD_PANEL_NAME);
-
-  // Force a menu rebuild to recognize our new subtask
-  menu_rebuild();
-  
-  return TRUE;
-}
 
 function _total_control_pluralize($word){
   $word = trim($word);
@@ -238,4 +290,4 @@ function total_control_views_pre_render(
     print_r($view->display);exit;
   }
 }
- */
\ No newline at end of file
+ */
Index: plugins/content_types/create.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/plugins/content_types/create.inc,v
retrieving revision 1.6
diff -u -p -r1.6 create.inc
--- plugins/content_types/create.inc	8 Jul 2009 20:06:38 -0000	1.6
+++ plugins/content_types/create.inc	10 Aug 2009 02:15:35 -0000
@@ -36,7 +36,7 @@ function total_control_create_content_ty
   foreach ($types as $type => $object){
     $row = '';
     // compare against type option on pane config
-    if ($conf['types'][$type] || !array_key_exists('types',$conf)){  
+    if (isset($conf['types']) && ($conf['types'][$type] || !array_key_exists('types',$conf))){  
       
       // check access to create nodes of this type
       if (user_access('create ' . $type . ' content')) {
@@ -98,4 +98,4 @@ function total_control_create_content_ty
   foreach (array_keys($form_state['plugin']['defaults']) as $key) {
     $form_state['conf'][$key] = $form_state['values'][$key];
   } 
-}
\ No newline at end of file
+}
Index: plugins/content_types/overview_content.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/plugins/content_types/overview_content.inc,v
retrieving revision 1.7
diff -u -p -r1.7 overview_content.inc
--- plugins/content_types/overview_content.inc	8 Jul 2009 20:06:38 -0000	1.7
+++ plugins/content_types/overview_content.inc	10 Aug 2009 02:15:35 -0000
@@ -35,24 +35,24 @@ function total_control_overview_content_
     
   // Content Overview
   foreach ($types as $type => $object){
-    if (($conf['types']== NULL) || $conf['types'][$type]){  // compare against type option on pane config
+    if (empty($conf['types']) || (isset($conf['types']) && $conf['types'][$type])){  // compare against type option on pane config
       $type_query = db_query("SELECT count(*) FROM {node} WHERE type = '%s' and status = 1", $type);
       $total[$type] = format_plural(db_result($type_query), '1 '.$object->name.' item', '@count '.$object->name.' items');
       
       $comment_setting = variable_get('comment_'. $type, 'comment');
-      if (($comment_setting != 0) || $conf['comments'][$type]){ // compare against comment option on pane config
+      if (($comment_setting != 0) || (isset($conf['comments']) && $conf['comments'][$type])){ // compare against comment option on pane config
         $comment_query = db_query("SELECT count(DISTINCT cid) FROM {comments} c INNER JOIN {node} n ON c.nid = n.nid WHERE n.type = '%s' and c.status = 1 AND n.status = 1", $type);
         $total[$type.'_comments'] =  format_plural(db_result($comment_query), '1 comment', '@count comments');
         
-        if ($conf['spam'] == 1){ // compare against comment option on pane config
+        if (isset($conf['spam']) && $conf['spam'] == 1){ // compare against comment option on pane config
           $spam_query = db_query("SELECT count(DISTINCT c.cid) FROM {comments} c INNER JOIN {node} n ON c.nid = n.nid WHERE n.type = '%s' and c.status = 0 AND n.status = 1", $type);
           $total[$type.'_comments_spam'] = format_plural(db_result($spam_query), '1 spam', '@count spam');
         } // if spam
       } // if comment
       
       $line =  $total[$type];
-      $line .= ($total[$type.'_comments'])? ' with ' . $total[$type.'_comments'] : '' ;
-      $line .= ($total[$type.'_comments_spam'])? ' (' . $total[$type.'_comments_spam'].')' : '' ;
+      $line .= (isset($total[$type.'_comments']))? ' with ' . $total[$type.'_comments'] : '' ;
+      $line .= (isset($total[$type.'_comments_spam']))? ' (' . $total[$type.'_comments_spam'].')' : '' ;
       $overview[] = $line;
     } // if type
   } // foreach
Index: plugins/content_types/taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/plugins/content_types/taxonomy.inc,v
retrieving revision 1.5
diff -u -p -r1.5 taxonomy.inc
--- plugins/content_types/taxonomy.inc	19 Jun 2009 19:12:09 -0000	1.5
+++ plugins/content_types/taxonomy.inc	10 Aug 2009 02:15:35 -0000
@@ -30,7 +30,7 @@ function total_control_taxonomy_content_
   $block = new stdClass();
   $block->module = t('total_control');
   
-  $vids = ($conf['vids'])? $conf['vids']: array();
+  $vids = (isset($conf['vids']))? $conf['vids']: array();
   
   $vocabs = taxonomy_get_vocabularies();
   $rows = array();  
Index: plugins/content_types/welcome.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/total_control/plugins/content_types/welcome.inc,v
retrieving revision 1.2
diff -u -p -r1.2 welcome.inc
--- plugins/content_types/welcome.inc	25 Jun 2009 05:54:52 -0000	1.2
+++ plugins/content_types/welcome.inc	10 Aug 2009 02:15:35 -0000
@@ -33,10 +33,8 @@ function total_control_welcome_content_t
   $content .= '  <h2 class="title">' . t('Congratulations, You are now in Total Control!') . '</h2>';
   $content .= '  <div class="content">';
   $content .= '    <p>'.t('Welcome to the total control admin dashboard.  Please review the tips below for how to make this dashboard the perfect hub for all your administration needs.').'</p>';
-  $content .=      '<p>'.t('A few panes are provided here for you by default, but there are ').'<strong>'.t('other panes available').'</strong>'.t('.  Go to Admin > Site building > Pages.  Locate the "Admin Dashboard" in the list.  Under "Operations" at right, click "Panel Content". On the panel layout page, click the plus sign at the top left of any panel and select "Add content" from the drop-down.  Your Total Control options are provided under "Admin Dashboard" on the left. Add as many or as few as you like, and make this dashboard your own!').'</p>';
-    $content .=      '<p>'.t('You can also ').'<strong>'.t('change information shown').'</strong>'.t(' on many of these panes. You can exclude a specific content type or vocabulary from the lists provided by changing the settings for each pane. Go to Admin > Site building > Pages.  Locate the "Admin Dashboard" in the list.  Under "Operations" at right, click "Panel Content".  Of the panes already added, click on the cog-wheel at the top right, and select "Settings" from the drop-down.  Customize as you see fit. ').'</p>';
+  $content .=      '<p>'.t('A few panes are provided here for you by default, but there are ').'<strong>'.t('other panes available').'</strong>'.t('.  Go to Admin > Site building > Pages.  Locate the "Admin Dashboard" in the list.  "Edit" that panel and click on "Content". On the panel content page, click the plus sign at the top left of any panel and select "Add content" from the drop-down.  Your Total Control options are provided under "Admin Dashboard" on the left. Add as many or as few as you like, and make this dashboard your own!').'</p>';
   $content .= '<p>'.t('The tabs on this page are default views provided as part of Total Control.  I guessed at what you might like to see there, but please ').'<strong>'.t('override each view').'</strong>'.t(' as necessary at Admin > Site Building > Views.').'</p>';
-  $content .= '<p>'.t('If you want something else here, or think your overrides should be included by default, please ').l(t('post an issue'),'http://drupal.org/project/issues/total_control', array('absolute' => TRUE, 'target'=>'_blank')).t(' and let me know.').'</p>';
   $content .= '  </div>';
   $content .= '</div>';
 
