function theme_deploy_ui_overview in Deploy - Content Staging 7.2
Theme callback for the overview page.
1 theme call to theme_deploy_ui_overview()
- deploy_ui_overview_page in modules/
deploy_ui/ deploy_ui.pages.inc - Page callback for the overview page.
File
- modules/
deploy_ui/ deploy_ui.pages.inc, line 95 - Deploy UI page functions.
Code
function theme_deploy_ui_overview($variables) {
drupal_add_css(drupal_get_path('module', 'deploy_ui') . '/css/deploy_ui.admin.css');
$blocks = $variables['blocks'];
$container = array();
$i = 0;
foreach ($blocks as $block) {
$position = ++$i % 2 ? 'left' : 'right';
$container[$position][] = $block;
}
$output = '<div class="admin clearfix">';
foreach ($container as $position => $blocks) {
foreach ($blocks as $block) {
$status_info = deploy_status_info($block['status']);
$output .= '<div class="' . $position . ' clearfix">';
$output .= '<div class="admin-panel deploy-panel">';
$output .= '<h3>' . $block['plan_title'] . '</h3>';
if (!$block['fetch_only'] && $status_info) {
$output .= '<div class="messages ' . $status_info['class'] . '">';
$output .= '<h4 class="element-invisible">Status message</h4>';
$output .= $status_info['title'];
$output .= '</div>';
}
$output .= '<div class="description">';
$output .= '<h4 class="element-invisible">Plan description</h4>';
$output .= $block['plan_description'];
$output .= '</div>';
if (!$block['fetch_only']) {
$actions = array(
array(
'title' => t('Deploy'),
'href' => 'admin/structure/deploy/plans/list/' . $block['plan_name'] . '/deploy',
'query' => array(
'cancel_path' => $_GET['q'],
),
),
array(
'title' => t('Empty'),
'href' => 'admin/structure/deploy/' . $block['plan_name'] . '/empty',
),
);
$output .= theme('links', array(
'links' => $actions,
'attributes' => array(
'class' => 'action-links',
),
));
}
else {
$output .= '<div class="description">' . t('This plan is <em>fetch-only</em>, and can therefore not be deployed in push fashion.') . '</div>';
}
$output .= '<div class="body">';
$output .= $block['content'];
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
}
}
$output .= '</div>';
return $output;
}