You are here

function theme_uc_roles_expiration in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_roles/uc_roles.module \theme_uc_roles_expiration()
  2. 7.3 uc_roles/uc_roles.admin.inc \theme_uc_roles_expiration()

Themes user role expiration page.

File

uc_roles/uc_roles.admin.inc, line 48
Roles administration menu items.

Code

function theme_uc_roles_expiration($form) {
  $header = _uc_roles_expiration_header();
  if (is_array($form['name'])) {
    foreach (element_children($form['name']) as $key) {
      $rows[] = array(
        drupal_render($form['name'][$key]),
        drupal_render($form['role'][$key]),
        drupal_render($form['expiration'][$key]),
        drupal_render($form['operations'][$key]),
      );
    }
  }
  else {
    $rows[] = array(
      array(
        'data' => t('No expirations set to occur'),
        'colspan' => '4',
      ),
    );
  }

  // Render everything.
  $output .= theme('table', $header, $rows);
  $output .= theme('pager', NULL, 50, 0);
  $output .= drupal_render($form);
  return $output;
}