function _hosting_task_button in Hostmaster (Aegir) 6
2 calls to _hosting_task_button()
- hosting_task_queue_block in modules/
hosting/ task/ hosting_task.module - Hosting task list queue block
- hosting_task_table in modules/
hosting/ task/ hosting_task.module - A concise table listing of the tasks affecting this node
File
- modules/
hosting/ task/ hosting_task.module, line 1028 - Web server node type is defined here.
Code
function _hosting_task_button($title, $link, $description, $class = '', $status = TRUE, $dialog = FALSE, $add_token = TRUE) {
global $user;
if ($status) {
$classes[] = 'hosting-button-enabled';
if (!empty($class)) {
$classes[] = $class;
}
if ($dialog) {
$classes[] = 'hosting-button-dialog';
}
$options['attributes'] = array(
'title' => $description,
'class' => implode(" ", $classes),
);
if ($add_token) {
$options['query'] = array(
'token' => drupal_get_token($user->uid),
);
}
return l($title, $link, $options);
}
else {
return "<span class='hosting-button-disabled'>" . $title . "</span>";
}
}