function theme_hosting_migrate_comparison in Hostmaster (Aegir) 6
Render a list of compared packages for migration.
1 theme call to theme_hosting_migrate_comparison()
- hosting_migrate_comparison in modules/
hosting/ migrate/ hosting_migrate.module - Compare package schema versions between the current and target platform in temp tables
File
- modules/
hosting/ migrate/ hosting_migrate.module, line 256
Code
function theme_hosting_migrate_comparison($packages) {
$rows = array();
$headers = array(
t("Package"),
t("Current"),
t("Target"),
);
foreach ($packages as $key => $instance) {
$row = array();
$row[] = array(
'data' => $instance->short_name,
'class' => 'hosting-status',
);
$target_schema = (int) $instance->target_schema == 0 ? $instance->current_schema : $instance->target_schema;
$row[] = _hosting_migrate_version_display($instance->current_version, $instance->current_schema);
$row[] = _hosting_migrate_version_display($instance->target_version, $target_schema, $instance->status);
$rows[] = array(
'data' => $row,
'class' => $instance->enabled ? 'hosting-success' : 'hosting-info',
);
}
$options['attributes']['class'] = 'hosting-migrate-comparison-return';
$link = l(t('Go back'), 'node/' . arg(3) . '/site_migrate', $options);
return "<div id='hosting-package-comparison'>" . $link . theme('table', $headers, $rows) . $link . "</div>";
}