Advertisement
DrupalCustom

themeDash

Feb 13th, 2012
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.32 KB | None | 0 0
  1. /**
  2.  * @todo Please document this function.
  3.  * @see http://drupal.org/node/1354
  4.  */
  5. function theme_freeway_dashboard($variables) {
  6.   $form = $variables['form'];
  7.   drupal_add_js(drupal_get_path('module', 'freeway') . '/js/dashboardscript.js');
  8.   global $user;
  9.   $rows = array();
  10.   foreach (element_children($form) as $key) {
  11.     $row = array();
  12.     if (isset($form[$key]['projectID'])) {
  13.       $status = drupal_render($form['featured'][$key]);
  14.       $row[] = array('data' => l(drupal_render($form[$key]['projectID']), 'user/' . $user->uid . '/freewayDashboardDetails', array('query' => array('project_id' => $form[$key]['projectID']['#value']))));
  15.  
  16.       $row[] = array('data' => drupal_render($form[$key]['projectDesc']));
  17.       $row[] = array('data' => drupal_render($form[$key]['projectStatusCode']));
  18.  
  19.       $rows[] = $row;
  20.  
  21.       l(t('Title'), $url, array('attributes' => array('target' => '_blank')));
  22.     }
  23.  
  24.   }
  25.  
  26.   $header = array();
  27.   $header[] = t('Project ID');
  28.   $header[] = t('Project Description');
  29.   $header[] = t('Project Status');
  30.  
  31.   $output = '<div class="table_overflow">' . theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('size' => 10, 'class' => array('table_class')))) . '</div>';
  32.  
  33.  
  34.  
  35.  
  36.   $output .= drupal_render_children($form);
  37.  
  38.  
  39.   return $output;
  40.  
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement