You are here

function deploy_overview in Deploy - Content Staging 5

Same name and namespace in other branches
  1. 6 deploy.plans.admin.inc \deploy_overview()

deployment overview page menu callback

1 string reference to 'deploy_overview'
deploy_menu in ./deploy.module
Implementation of hook_menu().

File

./deploy.module, line 172

Code

function deploy_overview() {
  $result = db_query("select * from {deploy_plan}");
  while ($plan = db_fetch_array($result)) {
    $items = deploy_get_plan_items($plan['pid']);
    $plan_entry = l($plan['name'], 'admin/build/deploy/list/' . $plan['pid']);
    if (empty($items)) {
      $plan_entry = check_plain($plan['name']);
    }
    $row = array(
      $plan_entry,
      check_plain($plan['description']),
      l(t('edit'), 'admin/build/deploy/plan/' . $plan['pid']),
      l(t('delete'), 'admin/build/deploy/delete/plan/' . $plan['pid']),
      l(t('push'), 'admin/build/deploy/push/' . $plan['pid']),
    );
    $rows[] = $row;
  }
  if (empty($rows)) {
    $rows[] = array(
      array(
        'data' => t('No deployment plans available.'),
        'colspan' => '4',
        'class' => 'message',
      ),
    );
  }
  $header = array(
    t('Name'),
    t('Description'),
    array(
      'data' => t('Operations'),
      'colspan' => 3,
    ),
  );
  $output = theme('table', $header, $rows);
  $output .= l(t("Add a New Deployment Plan"), "/admin/build/deploy/add", array());
  return $output;
}