You are here

function theme_certificate_admin_clear_form in Certificate 8.3

Same name and namespace in other branches
  1. 6.2 certificate.admin.inc \theme_certificate_admin_clear_form()
  2. 6 certificate.admin.inc \theme_certificate_admin_clear_form()
  3. 7.2 certificate.admin.inc \theme_certificate_admin_clear_form()
  4. 4.x certificate.admin.inc \theme_certificate_admin_clear_form()
  5. 3.x certificate.admin.inc \theme_certificate_admin_clear_form()

Theme certificate_admin_clear_form.

File

./certificate.admin.inc, line 432
Administrative pages for Certificate module.

Code

function theme_certificate_admin_clear_form($variables) {
  $form = $variables['form'];

  // TODO Please change this theme call to use an associative array for the $variables parameter.
  $header = array(
    theme('table_select_header_cell'),
    array(
      'data' => 'Title',
      'field' => 'n.title',
    ),
    array(
      'data' => 'Count',
      'field' => 'cs_count',
    ),
  );
  $rows = array();
  if (!empty($form['cs']['title'])) {
    foreach (element_children($form['cs']['title']) as $key) {
      $rows[] = array(
        drupal_render($form['cs']['nids'][$key]),
        drupal_render($form['cs']['title'][$key]),
        drupal_render($form['cs']['count'][$key]),
      );
    }
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
    'empty' => t('No snapshots to clear.'),
  )) . drupal_render_children($form);
}