You are here

function theme_uc_roles_expiration in Ubercart 7.3

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

Themes user role expiration page.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.

File

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

Code

function theme_uc_roles_expiration($variables) {
  $form = $variables['form'];
  $header = _uc_roles_expiration_header();
  $rows = array();
  if (isset($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['edit'][$key]),
        drupal_render($form['delete'][$key]),
      );
    }
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
    'empty' => t('No expirations set to occur'),
  ));
  $output .= theme('pager');
  $output .= drupal_render_children($form);
  return $output;
}