function theme_l10n_update_version_status in Localization update 7
Same name and namespace in other branches
- 6 l10n_update.admin.inc \theme_l10n_update_version_status()
Format version status with icon.
Parameters
string $status: Version status: 'uptodate', 'updatable', 'available', 'unknown'.
string $type: Update type: 'download', 'localfile'.
Return value
sting HTML output.
2 theme calls to theme_l10n_update_version_status()
- theme_l10n_update_current_release in ./
l10n_update.admin.inc - Format current translation version.
- theme_l10n_update_single_project_status in ./
l10n_update.admin.inc - Format a single project translation state.
File
- ./
l10n_update.admin.inc, line 533 - Admin settings and update page.
Code
function theme_l10n_update_version_status($variables) {
$icon = '';
$msg = '';
switch ($variables['status']) {
case 'uptodate':
$icon = theme('image', array(
'path' => 'misc/watchdog-ok.png',
'alt' => t('ok'),
'title' => t('ok'),
));
$msg = '<span class="current">' . t('Up to date') . '</span>';
break;
case 'updatable':
$icon = theme('image', array(
'path' => 'misc/watchdog-warning.png',
'alt' => t('warning'),
'title' => t('warning'),
));
$msg = '<span class="not-current">' . t('Update available') . '</span>';
break;
case 'available':
$icon = theme('image', array(
'path' => 'misc/watchdog-warning.png',
'alt' => t('warning'),
'title' => t('warning'),
));
$msg = '<span class="not-current">' . t('Uninstalled translation available') . '</span>';
break;
case 'unknown':
$icon = theme('image', array(
'path' => 'misc/watchdog-warning.png',
'alt' => t('warning'),
'title' => t('warning'),
));
$msg = '<span class="not-supported">' . t('No available translations found') . '</span>';
break;
}
$output = '<div class="version-status">';
$output .= $msg;
$output .= '<span class="icon">' . $icon . '</span>';
$output .= "</div>\n";
return $output;
}