You are here

function theme_filebrowser_admin_settings in Filebrowser 6

File

./filebrowser.module, line 258

Code

function theme_filebrowser_admin_settings($form) {
  $rows = array();
  if (isset($form['paths'])) {
    foreach (element_children($form['paths']) as $key) {
      $row = array();
      $row[] = l($form['paths'][$key]['#value'], $form['paths'][$key]['#value']);
      $row[] = $form['locations'][$key]['#value'];
      $stats = _filebrowser_dir_stats($form['locations'][$key]['#value']);
      $row[] = $stats['file_count'];
      $row[] = format_size($stats['total_size']);
      $row[] = $form['can_explore'][$key]['#value'] ? t('Yes') : t('No');
      $row[] = drupal_render($form['listing_checks'][$key]);
      $rows[] = $row;
    }
    $headers = array(
      t('Path'),
      t('Location'),
      t('Files'),
      t('Size'),
      t('Explorable'),
      t('Delete'),
    );
    $form['listings']['listings'] = array(
      '#value' => theme('table', $headers, $rows),
    );
  }
  $output = drupal_render($form);

  // Process any other fields and display them
  return $output;
}