You are here

function theme_certificate_admin_clear_form in Certificate 6

Same name and namespace in other branches
  1. 8.3 certificate.admin.inc \theme_certificate_admin_clear_form()
  2. 6.2 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 873
Administrative pages for the module.

Code

function theme_certificate_admin_clear_form($form) {
  $header = array(
    theme('table_select_header_cell'),
    array(
      'data' => 'Title',
      'field' => 'n.title',
    ),
    array(
      'data' => 'Count',
      'field' => 'cs_count',
    ),
  );
  if (count($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]),
      );
    }
  }
  else {
    return "No snapshots to clear.";
  }
  return theme('table', $header, $rows) . drupal_render($form);
}