You are here

function deploy_server_overview in Deploy - Content Staging 6

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

Display a list of all deployment servers.

Return value

Themed table output.

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

File

./deploy.servers.admin.inc, line 13
Page handlers for deploy server admin.

Code

function deploy_server_overview() {
  $header = array(
    t('Name'),
    t('URL'),
    t('Authentication type'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  $result = db_query("SELECT * FROM {deploy_servers}");
  while ($row = db_fetch_array($result)) {
    $auth_type = deploy_get_auth_type($row['auth_type']);
    $row = array(
      check_plain($row['description']),
      check_plain($row['url']),
      $auth_type['title'],
      l(t('edit'), 'admin/build/deploy/server/' . $row['sid']),
      l(t('delete'), 'admin/build/deploy/delete/server/' . $row['sid']),
    );
    $rows[] = $row;
  }
  if (empty($rows)) {
    $rows[] = array(
      array(
        'data' => t('No deployment servers available.'),
        'colspan' => '4',
        'class' => 'message',
      ),
    );
  }
  $output = theme('table', $header, $rows);
  $output .= l(t("Add a new server"), "admin/build/deploy/server/add", array());
  return $output;
}