You are here

function theme_support_page_form in Support Ticketing System 6

Same name and namespace in other branches
  1. 7 support.module \theme_support_page_form()

Theme function for ticket list

2 calls to theme_support_page_form()
theme_support_substatus_page_form in support_substatus/support_substatus.module
theme_support_substatus_page_user in support_substatus/support_substatus.module

File

./support.module, line 3272
support.module

Code

function theme_support_page_form($form) {
  drupal_add_css(drupal_get_path('module', 'support') . '/support-tickets.css');
  $output = drupal_render($form['filter']);
  $output .= drupal_render($form['post-ticket']);
  if (isset($form['title']) && is_array($form['title'])) {
    foreach (element_children($form['title']) as $key) {
      $row = array();
      $row[] = drupal_render($form['tickets'][$key]);
      $row[] = drupal_render($form['id'][$key]);
      $row[] = drupal_render($form['title'][$key]);
      $row[] = drupal_render($form['updated'][$key]);
      $row[] = drupal_render($form['reported'][$key]);
      $row[] = drupal_render($form['assigned']["assigned-{$key}"]);
      $row[] = drupal_render($form['state']["state-{$key}"]);
      $row[] = drupal_render($form['priority']["priority-{$key}"]);
      $row[] = drupal_render($form['updates'][$key]);
      if ($form['all_clients']) {
        $row[] = drupal_render($form['client'][$key]);
      }
      $rows[] = array(
        'data' => $row,
        'class' => $form['class'][$key]['#value'],
      );
      unset($form['class'][$key]);
    }
    unset($form['all_clients']);
  }
  else {
    $rows[] = array(
      array(
        'data' => t('No tickets available.'),
        'colspan' => '9',
      ),
    );
  }
  if ($form['pager']['#value']) {
    $output .= drupal_render($form['pager']);
  }
  $output .= theme('table', $form['header']['#value'], $rows, array(
    'class' => 'support',
  ));
  $output .= drupal_render($form['update']);
  $output .= drupal_render($form['suppress']);
  $output .= drupal_render($form['submit']);
  $output .= drupal_render($form);
  return $output;
}