function tmgmt_ui_color_legend in Translation Management Tool 7
Provides color legends for source statuses.
1 call to tmgmt_ui_color_legend()
- tmgmt_ui_help in ui/
tmgmt_ui.module - Implements hook_help().
File
- ui/
tmgmt_ui.module, line 1114 - Common Translation managment UI.
Code
function tmgmt_ui_color_legend() {
global $theme;
drupal_add_css(drupal_get_path('module', 'tmgmt_ui') . '/css/tmgmt_ui.admin.css');
if ($theme == 'seven') {
drupal_add_css(drupal_get_path('module', 'tmgmt_ui') . '/css/tmgmt_ui.admin.seven.css');
}
$legends = array();
$legends[] = array(
'legend' => t('Source Language'),
'color' => 'tmgmt-ui-icon-white',
);
$legends[] = array(
'legend' => t('Not translated'),
'color' => 'tmgmt-ui-icon-grey',
);
$legends[] = array(
'legend' => t('In progress'),
'color' => 'tmgmt-ui-icon-blue',
);
$legends[] = array(
'legend' => t('Ready for review'),
'color' => 'tmgmt-ui-icon-yellow',
);
$legends[] = array(
'legend' => t('Translated'),
'color' => 'tmgmt-ui-icon-green',
);
$legends[] = array(
'legend' => t('Translation Outdated'),
'color' => 'tmgmt-ui-icon-orange',
);
$output = '<div class="tmgmt-color-legend clearfix">';
foreach ($legends as $legend) {
$output .= '<div class="tmgmt-one-legend">
<div class="tmgmt-legend-icon tmgmt-ui-icon tmgmt-ui-icon-10 ' . $legend['color'] . '"><span></span></div>
<div class="tmgmt-legend-status">' . $legend['legend'] . '</div>
</div>';
}
$output .= '</div>';
return $output;
}