DrupalCustom

asdf

Jan 31st, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.79 KB | None | 0 0
  1. <?php
  2. function theme_freeway_dashboard_details($form) {
  3. drupal_add_js(drupal_get_path('module', 'freeway') .'/js/dashboardscript.js');
  4. GLOBAL $user;
  5.     $pidobtained = $_GET['project_id'] ;
  6.    
  7.         $rows = array();
  8.        
  9.         foreach (element_children($form) as $key) {
  10.            
  11.                 $row = array();                
  12.                     $row[] = array('data' => drupal_render($form[$key]['FileID']));
  13.                     //echo '<pre>';
  14.                     //var_dump($form[$key]['FileID']);
  15.                     $row[] = array('data' => drupal_render($form[$key]['Filename']));
  16.                     $row[] = array('data' => drupal_render($form[$key]['SourceLanguageID']));
  17.                     $row[] = array('data' => drupal_render($form[$key]['TargetLanguageID']));
  18.                    
  19. if($form[$key]['StatusID']['#value'] == 'READY'){
  20.  
  21.                
  22. $row[] = array(
  23.   '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']), 'attributes'=> array('class' => 'common_link_class'))),
  24. );                 
  25.                    
  26.                    
  27.                     }
  28.                     else {
  29.                     $row[] = array('data' => drupal_render($form[$key]['StatusID']));
  30.                     }
  31.                    
  32.                     $row[] = array('data' => drupal_render($form[$key]['StatusDescription']));                     
  33.                     $rows[] = $row;
  34.                
  35.                                        
  36.                 }
  37.                 $header = array();
  38.                 $header[] = t('File ID');
  39.                 $header[] = t('File Name');
  40.                 $header[] = t('Source Language');
  41.                 $header[] = t('Target Language');
  42.                 $header[] = t('Status ID');
  43.                 $header[] = t('Status Description');
  44.                
  45.                
  46.                    
  47.                 //$output = theme('table', $header, $rows);
  48.                 $output = '<div class="table_overflow">'. theme('table', $header, $rows,array('size'=>10, 'class' => 'table_class')) .'</div>';
  49.                
  50.                 $output .= drupal_render($form);
  51.             return $output;
  52.  
  53.         }
  54.  
  55.  
  56. >
Advertisement
Add Comment
Please, Sign In to add comment