You are here

function upgrade_assist_block in Upgrade Status 5

Same name and namespace in other branches
  1. 6 upgrade_assist/upgrade_assist.module \upgrade_assist_block()

Implementation of hook_block().

File

upgrade_assist/upgrade_assist.module, line 153
Assists in upgrading Drupal.

Code

function upgrade_assist_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {
    $blocks['workflow'] = array(
      'info' => t('Upgrade workflow'),
      'region' => 'left',
      'status' => 1,
      'weight' => -10,
    );
    return $blocks;
  }
  else {
    if ($op == 'view') {
      $block = array();
      switch ($delta) {
        case 'workflow':
          drupal_add_css(drupal_get_path('module', 'upgrade_assist') . '/upgrade_assist.css');
          $block['subject'] = t('Drupal Upgrade');
          $tasks = upgrade_assist_states(TRUE);
          $block['content'] = theme('item_list', $tasks, NULL, 'ol', array(
            'class' => 'task-list',
          ));
          break;
      }
      return $block;
    }
  }
}