tmgmt_local.theme.inc in Translation Management Tool 7
File
translators/tmgmt_local/includes/tmgmt_local.theme.inc
View source
<?php
function theme_tmgmt_local_translation_form($variables) {
$result = '';
$translation = $variables['element']['translation'];
foreach (element_children($translation) as $children_name) {
$children = $translation[$children_name];
$result .= drupal_render($children);
}
unset($variables['element']['translation']);
$result .= drupal_render_children($variables['element']);
return $result;
}
function theme_tmgmt_local_translation_form_element($variables) {
$element = $variables['element'];
$parts = explode('|', $element['#parents'][0]);
$header_title = ucfirst(str_replace('_', ' ', $parts[0]));
$result = '<div id="tmgmt-status-messages-' . strtolower($element['#parent_label'][0]) . '"></div>';
$result .= theme('table', array(
'attributes' => array(
'id' => $element['#ajaxid'],
'class' => array(
$element['#zebra'],
),
),
'header' => array(
array(
'data' => $header_title,
'colspan' => 3,
),
),
'rows' => array(
array(
'data' => array(
drupal_render($element['source']),
drupal_render($element['translation']),
drupal_render($element['actions']),
),
),
),
));
return $result;
}