function hosting_site_view in Hosting 5
Same name and namespace in other branches
- 6.2 site/hosting_site.nodeapi.inc \hosting_site_view()
- 7.4 site/hosting_site.nodeapi.inc \hosting_site_view()
- 7.3 site/hosting_site.nodeapi.inc \hosting_site_view()
File
- site/
hosting_site.module, line 436
Code
function hosting_site_view(&$node, $teaser = false) {
hosting_set_breadcrumb($node);
$node->content['info']['#prefix'] = '<div id="hosting-site-info">';
if ($node->site_status == HOSTING_SITE_ENABLED) {
$node->content['info']['link'] = array(
'#value' => l(t('Go to site'), 'http://' . $node->title),
'#weight' => -10,
);
}
if (is_numeric($node->client)) {
$node->content['info']['client'] = array(
'#type' => 'item',
'#title' => t('Client'),
'#value' => _hosting_node_link($node->client),
'#weight' => 5,
);
}
$node->content['info']['verified'] = array(
'#type' => 'item',
'#title' => t('Verified'),
'#value' => hosting_format_interval($node->verified),
);
$node->content['info']['platform'] = array(
'#type' => 'item',
'#title' => t('Platform'),
'#value' => _hosting_node_link($node->platform),
);
if ($node->profile) {
$node->content['info']['profile'] = array(
'#type' => 'item',
'#title' => t('Install profile'),
'#value' => _hosting_node_link($node->profile),
);
}
if ($node->language) {
$node->content['info']['language'] = array(
'#type' => 'item',
'#title' => t('Language'),
'#value' => _hosting_language_name($node->language),
);
}
if ($node->db_server) {
$node->content['info']['db_server'] = array(
'#type' => 'item',
'#title' => t('Database server'),
'#value' => _hosting_node_link($node->db_server),
);
}
if ($node->nid) {
$node->content['info']['status'] = array(
'#type' => 'item',
'#title' => t('Status'),
'#value' => _hosting_site_status($node),
);
}
$node->content['info']['#suffix'] = '</div>';
if ($node->nid) {
$node->content['tasks_view'] = array(
'#type' => 'item',
'#value' => hosting_task_list_embedded('rid', $node->nid),
'#prefix' => '<div id="hosting-task-list">',
'#suffix' => '</div>',
'#weight' => 10,
);
}
return $node;
}