Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function theme_freeway_dashboard_details($form) {
- drupal_add_js(drupal_get_path('module', 'freeway') .'/js/dashboardscript.js');
- GLOBAL $user;
- $pidobtained = $_GET['project_id'] ;
- $rows = array();
- foreach (element_children($form) as $key) {
- $row = array();
- $row[] = array('data' => drupal_render($form[$key]['FileID']));
- //echo '<pre>';
- //var_dump($form[$key]['FileID']);
- $row[] = array('data' => drupal_render($form[$key]['Filename']));
- $row[] = array('data' => drupal_render($form[$key]['SourceLanguageID']));
- $row[] = array('data' => drupal_render($form[$key]['TargetLanguageID']));
- if($form[$key]['StatusID']['#value'] == 'READY'){
- /*$row[] = array('data' => l(drupal_render($form[$key]['StatusID']),'user/'.$user->uid.'/freewayRetrieve',array('query' => array('fileId'=> $form[$key]['FileID']['#value'],'projectID'=> $pidobtained,'fileName'=>$form[$key]['Filename']['#value'],array('attributes'=> array('class' => 'common_link_class'))))));
- */
- $row[] = array('data' => l(drupal_render($form[$key]['StatusID']),'user/'.$user->uid.'/freewayRetrieve',array('query' => array('fileId'=> $form[$key]['FileID']['#value'],'projectID'=> $pidobtained,'fileName'=>$form[$key]['Filename']['#value'], array('attributes'=> array('class' => 'common_link_class'))))));
- }
- else {
- $row[] = array('data' => drupal_render($form[$key]['StatusID']));
- }
- $row[] = array('data' => drupal_render($form[$key]['StatusDescription']));
- $rows[] = $row;
- }
- $header = array();
- $header[] = t('File ID');
- $header[] = t('File Name');
- $header[] = t('Source Language');
- $header[] = t('Target Language');
- $header[] = t('Status ID');
- $header[] = t('Status Description');
- //$output = theme('table', $header, $rows);
- $output = '<div class="table_overflow">'. theme('table', $header, $rows,array('size'=>10, 'class' => 'table_class')) .'</div>';
- $output .= drupal_render($form);
- return $output;
- }
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement