You are here

function deploy_overview in Deploy - Content Staging 6

Same name and namespace in other branches
  1. 5 deploy.module \deploy_overview()

Display a list of all deployment plans.

Return value

Themed table output.

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

File

./deploy.plans.admin.inc, line 13
Page handlers for deploy plan admin.

Code

function deploy_overview() {
  $plans = deploy_get_plans();
  foreach ($plans as $plan) {
    $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' => '5',
        '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;
}