function theme_l10n_update_version_status in Localization update 6
Same name and namespace in other branches
- 7 l10n_update.admin.inc \theme_l10n_update_version_status()
Format version status with icon.
Parameters
string $status: Version status: 'ok', 'update', 'unknown'.
string $type: Update type: 'download', 'localfile'.
Return value
sting HTML output.
1 theme call to theme_l10n_update_version_status()
- theme_l10n_update_project_status in ./
l10n_update.admin.inc - Format project update status.
File
- ./
l10n_update.admin.inc, line 359 - Admin settings and update page.
Code
function theme_l10n_update_version_status($status, $type = NULL) {
$msg = $icon = '';
$output = '<div class="version-status">';
switch ($status) {
case 'ok':
$icon = theme('image', 'misc/watchdog-ok.png', t('ok'), t('ok'));
$msg = '<span class="current">' . t('Up to date') . '</span>';
break;
case 'update':
$icon = theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning'));
$txt = $type == 'download' ? t('Remote update available') : t('Local update available');
$msg = '<span class="not-current">' . $txt . '</span>';
break;
case 'unknown':
$icon = theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning'));
$msg = '<span class="not-supported">' . t('No information') . '</span>';
break;
}
$output .= $msg;
$output .= '<span class="icon">' . $icon . '</span>';
$output .= "</div>";
return $output;
}