Advertisement
DrupalCustom

if else test

Dec 30th, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1.  
  2. function theme_freeway_dashboard_details($form) {
  3.                 $rows = array();
  4.                 foreach (element_children($form) as $key) {
  5.            
  6.                 $row = array();                
  7.                     $row[] = array('data' => drupal_render($form[$key]['FileID']));
  8.                     $row[] = array('data' => drupal_render($form[$key]['Filename']));
  9.                     $row[] = array('data' => drupal_render($form[$key]['SourceLanguageID']));
  10.                     $row[] = array('data' => drupal_render($form[$key]['TargetLanguageID']));
  11.                    
  12.                     if( $form[$key]['StatusID']['value'] == 'READY')
  13.                     {
  14.                     $row[] = array('data' => l(drupal_render($form[$key]['StatusID']),'http://www.google.com',array('attributes' => array('class' => 'widelink',   'rel' => 'lightbox',  ) )));
  15.                     }
  16.                     else{
  17.                     $row[] = array('data' => drupal_render($form[$key]['StatusID']));                      
  18.                     }
  19.                     $row[] = array('data' => drupal_render($form[$key]['StatusDescription']));                     
  20.                     $rows[] = $row;
  21.                
  22.                                        
  23.                 }
  24.                 $header = array();
  25.                 $header[] = t('File ID');
  26.                 $header[] = t('File Name');
  27.                 $header[] = t('Source Language');
  28.                 $header[] = t('Target Language');
  29.                 $header[] = t('Status ID');
  30.                 $header[] = t('Status Description');
  31.                
  32.                    
  33.                 //$output = theme('table', $header, $rows,array('size'=>10, 'class' => 'table_class'));
  34.                 $output = theme('table', $header, $rows);
  35.                 $output .= drupal_render($form);
  36.      
  37.    
  38.             return $output;
  39.  
  40.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement